From: jsa@alexandria.organon.com (Jon S Anthony)
Subject: Re: dynamic memory allocation
Date: 1997/06/17
Date: 1997-06-17T00:00:00+00:00 [thread overview]
Message-ID: <JSA.97Jun17191247@alexandria.organon.com> (raw)
In-Reply-To: 33A55F1B.63FE@gsfc.nasa.gov
In article <33A55F1B.63FE@gsfc.nasa.gov> Stephen Leake <Stephen.Leake@gsfc.nasa.gov> writes:
> They are proposing a message passing scheme where sending tasks allocate
> buffers for each message from a heap, and receiving tasks deallocate. I
> have suggested that the heap could become fragmented (the buffers are
> NOT all the same size). They say "we'll just test it thoroughly".
Unless there is something "special" about the allocation vs. liveness
in this application, fragmentation is a certainty if deallocation does
not coalesce adjacent free space.
> Can anyone provide a reference to a book or study article that says this
> is bad?
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. However, the
_overhead_ of such capability could be a problem.
> and they don't even bother to mention dynamic allocation -
> unfortunately, that makes it hard to say "see, this book says it's
> bad".
Part of the problem is the meaning of "dynamic allocation". Certainly
stack allocation is just as dynamic as heap allocation. And you could
have "heap" style allocation from a preallocated pool.
> Or a book on designing dynamic memory allocation algorithms to avoid
> fragmentation?
I'm not sure there is any _book_ devoted to "memory management in
general", but it occurs in many books. For example, Aho, Hopcroft and
Ullman's "classic" _Data Structures and Algorithms_ has a chapter on
MM and it discusses this stuff including "buddy" systems and
compaction. Griswold & Griswold go over this is rather great detail
in _The Implementation of the Icon Programming Language_ (this is in
the context of GC). And of course this is discussed in Knuth.
Fragmentation concerns are also discussed in various settings in
Jones' and Lins' _Garbage Collection_ (which also has a very extensive
bibliography). On the Web you will find a lot of relevant information
(though mostly in the context of GC) at:
http://www.harlequin.com/mm/reference/bib/misc.html -- General bib
ftp://ftp.netcom.com/pub/hb/hbaker/home.html -- A lot of good stuff
ftp://ftp.cs.utexas.edu/pub/garbage/ -- All kinds of allocator stuff
/Jon
--
Jon Anthony
Organon Motives, Inc.
Belmont, MA 02178
617.484.3383
jsa@organon.com
next prev parent reply other threads:[~1997-06-17 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 ` Joel Seidman
1997-06-16 0:00 ` Samuel Mize
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 ` Brian Rogoff
1997-06-17 0:00 ` Michael F Brenner
1997-06-17 0:00 ` Glen Cornell
1997-06-17 0:00 ` Jon S Anthony [this message]
1997-06-18 0:00 ` Mats.Weber
1997-06-18 0:00 ` Jon S Anthony
1997-06-18 0:00 ` David Wheeler
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
-- 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