Parcelling out shared memory

Gordon Cross crossgl at ingr.UUCP
Mon Dec 5 03:10:46 AEST 1988


In article <6490 at netnews.upenn.edu>, lonhyn at eniac.seas.upenn.edu (Lonhyn Jasinsky) writes:
> 
> Has anyone out there ever needed/implemented some nifty
> scheme for managing shared memory?  I have a program 
> that currently malloc's all of its structures and whatnot.
> I would like to change it so that it instead keeps all of
> the data in shared memory.  I therefore need something to

Yes I have a general memory manager that allows you to define address ranges
to be carved up.  It also has facilities for growing sizes (defined by a user
routine) and trapping out-of-memory conditions.  And I also have a version of
"malloc" which is built on this algorithm.  It is designed to be VERY fast
especially on paging systems by managing internal data structures in such a
way as to avoid "memory wandering" to find available chunks.  There is even
a "stackalloc" to allocate TEMPORARY memory from your stack [this one could
in general be difficult to port if the compiler tries to get too smart about
the stack -- assuming you have a stack :-)].  If you want to have a go at it,
just let me know (I have not been in the habit of trying to write "portable"
code but it should port without too much difficulty).


Gordon Cross
Intergraph Corp.  Huntsville, AL
...uunet!ingr!crossgl



More information about the Comp.unix.wizards mailing list