Hello Dr. Norman,
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.
What I did:
Server:
Ram_dataspace_capability ds = env()->ram_session()->alloc(SIZE);
void* arg = env()->rm_session()->attach(ds);
I returned this ds through a getDataspace() RPC method on the server side to the invoking client.
I'm able to effectively write bulk data between components. Thank you for directing me toward this.
I have a couple of spinoff questions though.
1. Initially I tried creating a Ram_connection ram1 and allocated as in the ds_ownership program
ram1.ref_account(env()->ram_session->cap());
env()->ram_session()->transfer_quota(ram1.cap(), 8*1024);
Then Ram_dataspace_capability ds = ram1.alloc(SIZE); and attached ds to RM session and sent back ds.
But the client threw a C++ IPC error and called abort().
A) Is this because ram1 was local to the server?
B) Is the transfer quota mechanism is similar to the transfer_quota from the client during the creation of a session
in the constructor?
2. I'm still trying to get my head around the concept of a capability. I tried going through the definition of a capability
in base/capability.h, but I seemed to get nowhere. What can a user do with a capability - mechanisms such as
attach and detach with the help of a capability etc.
I'm sure you've had similar questions asked before. Thank you taking the time to respond.
Regards,
Aditya