Re: Fragmenting memory
- From: "Pierre le Riche" <pleriche@xxxxxxxxxxx>
- Date: Thu, 28 Jul 2005 05:08:10 +0200
Hi Ray,
> Thx for the info. So it's only a problem if the MM can't merge the free
> chunks.
No, all memory managers have to contend with fragmentation to a lesser or
larger extent. Consider the following sequence:
1) allocate a block of size x bytes
2) allocate a block of size 1 byte
3) free the block allocated in step 1
4) x = x + 1
5) go back to step 1
You will note that if the block in step 2 was placed directly after the
block allocated in step 1 in the address space, that on the next pass this
block (freed in step 3) will not be useable, because the new request is for
1 byte larger. Eventually you will run out of address space due to this
fragmentation.
The RTL MM is particularly vulnerable to this. For example code refer to the
Fragmentation Benchmark inside the Fastcode MM Challenge B&V.
Regards,
Pierre
.
- Follow-Ups:
- Re: Fragmenting memory
- From: Ray Mond
- Re: Fragmenting memory
- References:
- Fragmenting memory
- From: Ray Mond
- Re: Fragmenting memory
- From: Ray Mond
- Fragmenting memory
- Prev by Date: Re: Fragmenting memory
- Next by Date: Re: Benchmark App
- Previous by thread: Re: Fragmenting memory
- Next by thread: Re: Fragmenting memory
- Index(es):
Relevant Pages
|