Boost logo

Boost Users :

Subject: Re: [Boost-users] [Interprocess] Managed segment placement
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2014-07-03 14:08:33


El 03/07/2014 10:24, Jorge Bellon escribió:
> Hi Ion,
> Thank you for the info.
>
> The use case would be to manage a memory pool allocated on a remote node.
>
> This would be used by a run-time library for distributed programming. It would
> allocate a memory region and manage this memory from another node, so that
> we can perform operations with that piece of memory (allocate portions, transfer
> data, etc.) without the intervention of the local node.

Why can't you put the manager in the remote node? The manager also needs
to allocate memory for indexes that track the position of named/unique
objects and that memory comes from the memory region also used to
construct objects. If you don't need named objects you can use a null
index to minimize used memory.

Do you need to shared this remote node memory between processes? If you
only use remote memory from a single process you can speed things a bit
using raw pointers:

typedef basic_managed_external_buffer <
    char,
    rbtree_best_fit<null_mutex_family, void* >,
    null_index
> my_managed_external_buffer;

If you want to serialize objects then you should use offset_ptr<void>
instead of void*.

I still miss the point of separating the manager (which is placed in the
beginning of the memory region) and the rest of the region.

Best,

Ion


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net