<div dir="ltr">Hello Dr. Norman,<div><br></div><div>I stumbled upon some useful examples in test/ds_ownership and general search showed me how to pull off shared memory. It's an interesting implementation. </div><div><br></div><div>What I did:</div><div>Server:</div><div>Ram_dataspace_capability ds = env()->ram_session()->alloc(SIZE);</div><div>void* arg = env()->rm_session()->attach(ds);</div><div><br></div><div>I returned this ds through a getDataspace() RPC method on the server side to the invoking client.</div><div>I'm able to effectively write bulk data between components. Thank you for directing me toward this.</div><div><br></div><div>I have a couple of spinoff questions though. </div><div>1. Initially I tried creating a Ram_connection ram1 and allocated as in the ds_ownership program</div><div><br></div><div>ram1.ref_account(env()->ram_session->cap());</div><div>env()->ram_session()->transfer_quota(ram1.cap(), 8*1024); </div><div><br></div><div>Then Ram_dataspace_capability ds = ram1.alloc(SIZE); and attached ds to RM session and sent back ds.</div><div>But the client threw a C++ IPC error and called abort(). </div><div><br></div><div>A) Is this because ram1 was local to the server?</div><div><br></div><div>B) Is the transfer quota mechanism is similar to the transfer_quota from the client during the creation of a session</div><div>in the constructor?</div><div><br></div><div>2. I'm still trying to get my head around the concept of a capability. I tried going through the definition of a capability</div><div>in base/capability.h, but I seemed to get nowhere. What can a user do with a capability - mechanisms such as </div><div>attach and detach with the help of a capability etc.</div><div><br></div><div>I'm sure you've had similar questions asked before. Thank you taking the time to respond.</div><div><br></div><div>Regards,<br>Aditya</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 11, 2015 at 2:32 PM, Aditya Kousik <span dir="ltr"><<a href="mailto:adit267.kousik@...9..." target="_blank">adit267.kousik@...9...</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello Norman,<div><br></div><div>This documentation is quite exquisite, I'm just laying my eyes on it. Are there any implementation examples to support the sequence diagrams? They'll help map the theory to the implementation.</div><div><br></div><div>Cheers,</div><div>Aditya</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 11, 2015 at 2:02 PM, Norman Feske <span dir="ltr"><<a href="mailto:norman.feske@...1..." target="_blank">norman.feske@...1...</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Aditya,<br>
<br>
passing non-POD objects such as connected lists, maps, etc. as RPC<br>
arguments is not supposed to work. The reason is that a pointer with a<br>
meaning in one address space is meaningless in another address space.<br>
Please refer to the Section 8.12 of the manual [1] and particularly<br>
Section 8.12.2 for more details about the RPC mechanism.<br>
<br>
To transfer bulk data from one component to another, you may need to<br>
manually serialize your information to a shared memory buffer, to be<br>
picked up on the receiving side. See section 3.6 for the various<br>
approaches of inter-component communication.<br>
<br>
[1]<br>
<a href="http://genode.org/files/53bcb8e33fe6602fed25edc3c7b922c5/manual-2015-04-27.pdf" target="_blank">http://genode.org/files/53bcb8e33fe6602fed25edc3c7b922c5/manual-2015-04-27.pdf</a><br>
<br>
Cheers<br>
Norman<br>
<div><div><br>
On 05/11/2015 10:49 PM, Aditya Kousik wrote:<br>
> Hello,<br>
><br>
> Calling Rpc_<method>(args, ...) from Session_client causes segfault 11<br>
> when I try to pass anything other than a default datatype. I'm trying to<br>
> pass an object of std::string, and it prints the string inside the<br>
> <method> just fine, but when I make the call<Rpc_method>(st), it breaks.<br>
><br>
> I tried working around this by creating a char* pointer instead. Print<br>
> inside this method works and the rpc to session_component method also<br>
> reaches, but whatever pointer I receive in the session_component is<br>
> garbage data. How do I fix the RPC calls?<br>
><br>
> Thanks,<br>
> Aditya.<br>
<br>
</div></div>--<br>
Dr.-Ing. Norman Feske<br>
Genode Labs<br>
<br>
<a href="http://www.genode-labs.com" target="_blank">http://www.genode-labs.com</a> · <a href="http://genode.org" target="_blank">http://genode.org</a><br>
<br>
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden<br>
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth<br>
<br>
------------------------------------------------------------------------------<br>
One dashboard for servers and applications across Physical-Virtual-Cloud<br>
Widest out-of-the-box monitoring support with 50+ applications<br>
Performance metrics, stats and reports that give you Actionable Insights<br>
Deep dive visibility with transaction tracing using APM Insight.<br>
<a href="http://ad.doubleclick.net/ddm/clk/290420510;117567292;y" target="_blank">http://ad.doubleclick.net/ddm/clk/290420510;117567292;y</a><br>
_______________________________________________<br>
genode-main mailing list<br>
<a href="mailto:genode-main@lists.sourceforge.net" target="_blank">genode-main@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/genode-main" target="_blank">https://lists.sourceforge.net/lists/listinfo/genode-main</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>