Re: Memory Manager

From: Thorsten Engler [NexusDB] (thorsten.englerNO_at_SPAMnexusdb.com)
Date: 01/09/05


Date: Sun, 9 Jan 2005 20:35:50 +1000


> Another benefit of 64bits systems: they'll make move-on-realloc
> practically a thing of the past with a good memory manager. :)

NexusMM3, to be released shortly after NexusDB2 (in which it will be
included) allocates large allocations (>64KB) in a way to allows to grow
(reallocate) the allocation without having to copy the contents of the
allocation to a new memory location and without wasting address space by
pre-reserving more address space then is needed for the initial allocation.
The address of the allocated block of memory may change as a result of the
reallocate, but neither is additional physical memory required (other
MemoryManager implementations have to allocate the new, larger block of
memory and copy the contents before freeing the old block) nor is any memory
contents actually copied nor is the CPU cache flushed out (which can happen
with other MMs as a result of having to copy the memory contents). The time
required for a realloc remains constant independent of current allocation
size (other memory managers have to copy the contents, which will take
longer the larger the current allocation is). And all this on any normal
32bit system by adding a single new line to the project uses list. :)

Cheers,
Thorsten Engler [NexusMM Architect]



Relevant Pages

  • Re: How to release heap memory that is marked as free
    ... As I said, fragmentation is a very serious problem, and one of the most serious problems ... my allocator was accused of using massive amounts of memory. ... I'm going to have to re-think the memory allocation that I'm ... process's 'working set'. ...
    (microsoft.public.vc.mfc)
  • Re: [PATCH 00/28] Swap over NFS -v16
    ... memory they can consume. ... So we need the extra (skb) ... included in the reserve? ... if the allocation had to dip into emergency reserves, ...
    (Linux-Kernel)
  • Re: Memory leak with CAsyncSocket::Create
    ... read my essay on how storage allocators work. ... Create method is consuming system memory that is not released back to ... The memory consumption is either shown as "Mem Usage" on the Task ... many levels of allocation going ...
    (microsoft.public.vc.mfc)
  • Re: OT: C++ overloading operators
    ... dynamic allocation, no matter how many "clever tricks" are used... ... though there's enough memory in the system, ... all these "flexible data types" map into CPU command ... The computing environment is completely ...
    (comp.dsp)
  • Re: Memory Management
    ... The program is a bunch of DLLs. ... I'm still using the CRT's malloc and free to allocate memory. ... If the application makes a memory allocation request, ... I have implemented a memory manager for some SDK I'm working on (a ...
    (microsoft.public.vc.language)