Boost logo

Boost Users :

Subject: Re: [Boost-users] [Interprocess] Allocation algorithms
From: Oodini (svdbg____at_[hidden])
Date: 2013-06-24 03:43:47


That's what I started with at the beginning, but as I'd like to use containers (vectors, maps...), it seems I have to use a managed shared memory.

----- Mail original -----
> De: "Adrian Yu" <adrianandyu_at_[hidden]>
> À: boost-users_at_[hidden]
> Envoyé: Lundi 24 Juin 2013 07:26:49
> Objet: Re: [Boost-users] [Interprocess] Allocation algorithms
>
> You may try the shared_memory_object class defined in
> boost\interprocess\shared_memory_object.hpp . The truncate function
> is to allocate desired size of memory. Also, the mapped_region class
> defined in boost\interprocess\mapped_region.hpp should be used to
> get the address of shared memory and map to client program. Refer to
> this page for more details:
> http://www.boost.org/doc/libs/1_53_0/doc/html/interprocess/sharedmemorybetweenprocesses.html
> .
>
>
> Best regards!
>
>
> On Mon, Jun 24, 2013 at 7:33 AM, Oodini < svdbg____at_[hidden] > wrote:
>
>
> Hello,
>
> I need to allocate and fill about 10 big memories areas (several Gb)
> at the startup of my program.
> The data will never be modified or freed after during the program
> lifetime, and will be *only read* an other processes.
>
> What allocation algorithm should I take from the ones provided by the
> library ?
> Should I create a new one, more efficient (no reallocations, no race
> conditions...) ?
>
> Thanks.
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


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