Re: Fragmenting memory
- From: Florent Ouchet <ouchet.florent@xxxxxxxxxxx>
- Date: Wed, 27 Jul 2005 17:35:57 +0200
Ray Mond a écrit :
Is it possible to have a fragmented region of memory if no memory leaks are occuring? If so, how can this happen? Thanks.
Memory allocations and desallocations don't happen synchronously. This simple sample creates a little fragmentation:
(assuming that the memory is linearly allocated). alloc(a) alloc(b) alloc(c) descalloc(b)
now the memory between a and b is free, this is a fragmentation.
desalloc(a) and desalloc(c) happen later in the process execution.
There would not be fragmentation is allocation/desallocation were using the same model as LIFO stacks (the last block allocated is the first block freed).
Florent .
- References:
- Fragmenting memory
- From: Ray Mond
- Fragmenting memory
- Prev by Date: Re: NAFCQY [Not A FastCode Question, Yay!]: Int64 DivMod
- Next by Date: Re: improvement of index-calculation
- Previous by thread: Fragmenting memory
- Next by thread: Re: Fragmenting memory
- Index(es):