allocating stl containers in memory buffer
Date: Fri, 31 Dec 2004 14:40:08 +0100
Is it possible to create for example stl queue in previously allocated
memory buffer (memory shared between two processes)? I thought of sth like
that:
queue<int>* q=new(buffer) queue<int>;
but won't integer variables be allocated using default allocator? How to
force allocation in specified buffer? Access to shared memory is protected
by semaphores so the should be no problem with amount of requested memory.
Tomek
Relevant Pages
- Re: Critique on my solution for an exercise. (check if a date is valid)
... simplify anything, when done in Forth. ... N times the allocation of one fixed sized object through dynamic memory. ... Thus you rely on general memory allocator, which isn't written in Forth way ... scalability problems, which is bullshit. ... (comp.lang.forth) - Re: [PATCH] change gen_pool allocator to not touch managed memory
... The following patch modifies the gen_pool allocator to ... change is to eliminate the touching of the actual memory being allocated. ... + * Add a new chunk of memory to the specified pool. ... starting address of memory chunk to add to pool ... (Linux-Kernel) - [PATCH] [0/13] General DMA zone rework
... Traditionally it was designed only for ISA dma which is limited to ... On 32bit i386 with its limited virtual memory space the next zone is ... cannot actually be used for ISA or any other device with <32bit DMA mask. ... I chose to implement a new "maskable memory" allocator to solve these ... (Linux-Kernel) - Re: [RFC] genalloc != generic DEVICE memory allocator
... > Andrey> idea of which is a cute nice thing. ... > Keep in mind that genalloc was meant to be simple for basic memory ... generic allocator for both short-live strictly aligned blocks and ... So far I don't see any reason for changing to ... (Linux-Kernel) - Re: Q: HP-UX 11.31 slow performance without load
... Before the patch the kernel used to hang or crash. ... Which means that we're likely to have physical memory -- just not the ... Being inode related... ... It suggests you caused some memory to get flushed down to the allocator ... (comp.sys.hp.hpux) |
|