Hi,
My program runs two kinds of RPC server in a single process. Do I need to get sliced heap for each RPC server or can I just share one sliced heap object between the rpc server?
For example, Sliced_heap sliced_heap1(env()->ram_session(), env()->rm_session()); Sliced_heap sliced_heap2(env()->ram_session(), env()->rm_session()); ... Server1_root_component server1_root(&server1_ep, &sliced_heap1, ....); Server2_root_component server1_root(&server2_ep, &sliced_heap2, ....);
OR Sliced_heap sliced_heap(env()->ram_session(), env()->rm_session()); ... Server1_root_component server1_root(&server1_ep, &sliced_heap, ....); Server2_root_component server1_root(&server2_ep, &sliced_heap, ....);
My another question is : Do I need to use Synchronized_allocator to allocate a memory from heap (for object creation) when running multiple thread? Or is it ok to call (env()->heap()) for object creation in heap?
Thank you.
Bokdeuk Jeong