:: Re: [DNG] Memory management strateg…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Rainer Weikusat
Fecha:  
A: Didier Kryn
Cc: dng
Asunto: Re: [DNG] Memory management strategies.
Didier Kryn <kryn@???> writes:
> Le 01/02/2016 17:16, Rainer Weikusat a écrit :
>> Rainer Weikusat <rainerweikusat@???> writes:
>>
>> [...]
>>
>>> A more problematic (for some definition of problematic) situation is
>>> when there are many objects of different sizes and if objects whose
>>> size is identical have vastly differing lifetimes. This introduces
>>> so-called 'external fragmentation' into the malloc heap
>> Additional information: The usual 'household number' associated with
>> that would be that an allocator is considered memory efficient if not
>> more than 50% of the memory managed by it is effectively lost due to
>> external fragementation.
>
>     Note that if you manage your memory pool as an array then
> allocation and deallocation are extremely fast and can be done without
> consuming a single byte for book-keeping.


That's not possible unless the allocation size is always the same and
there's a known upper bound for the maximum number of objects which will
be needed. And there's also the "write FORTRAN in any language" aspect
;-) -- there are many unreal programmers on this planet.