comp.lang.ada
 help / color / mirror / Atom feed
From: Mats.Weber@elca-matrix.ch
Subject: Re: dynamic memory allocation
Date: 1997/06/18
Date: 1997-06-18T00:00:00+00:00	[thread overview]
Message-ID: <33A7B0B4.F75C277D@elca-matrix.ch> (raw)
In-Reply-To: JSA.97Jun17191247@alexandria.organon.com


Jon S Anthony wrote:

> Whether it's bad or not will really depend on the specifics of the
> application and the memory manager.  If the MM coaleces or compacts, I
> don't see how _fragmentation_ will be a problem. [...]

Should be "coaleces _and_ compacts". If it coaleces xor compacts, it is easy
to construct a program that runs out of memory due to fragmentation. Moreover,
compaction is quite unlikely to happen on most implementations as it requires
a double indirection or a GC-like scanning of all live pointers.

What we do to minimize fragmentation is to allocate only blocks with sizes
that are powers of two, and maintain one free list per power of two. It does
waste some storage but the program runs well for long periods of time.




  reply	other threads:[~1997-06-18  0:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-16  0:00 dynamic memory allocation Stephen Leake
1997-06-16  0:00 ` Samuel Mize
1997-06-16  0:00 ` Joel Seidman
1997-06-17  0:00 ` Jon S Anthony
1997-06-18  0:00   ` Mats.Weber [this message]
1997-06-18  0:00     ` Jon S Anthony
1997-06-17  0:00 ` Glen Cornell
1997-06-17  0:00 ` Robert Dewar
1997-06-17  0:00   ` Spam Hater
1997-06-17  0:00     ` Robert Dewar
1997-06-17  0:00   ` Stephen Leake
1997-06-17  0:00     ` Michael F Brenner
1997-06-17  0:00     ` Brian Rogoff
1997-06-18  0:00 ` David Wheeler
1997-06-18  0:00   ` Stephen Leake
1997-06-19  0:00     ` Arthur Schwarz
1997-06-20  0:00     ` David Wheeler
1997-06-19  0:00   ` JP Thornley
1997-06-18  0:00 ` David Wheeler
  -- strict thread matches above, loose matches on Subject: below --
1997-06-19  0:00 Marin David Condic, 561.796.8997, M/S 731-93
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox