Parcelling out shared memory

Lonhyn Jasinsky lonhyn at eniac.seas.upenn.edu
Sat Dec 3 08:27:47 AEST 1988


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
carve up and manage chunks of shared memory in a sane
manner. Of course I need to attach it at the same addresses
in each process so that pointers in linked lists and that
kind of stuff continues working, however I have a number
of problems:

	1) I don't want to rewrite malloc, although this
             might be what I end up doing.
        2) Malloc as it is will not cooperate because of
             obvious dependencies on brk and sbrk.
        3) Shared memory itself appears difficult to grow
             although a bunch of chunks could be attached
             contiguously in each processes address space.

Has anyone seen some public domain piece of code to do this
or have some code they would not mind sharing?  Being able
to free memory that has been "shmalloc()'ed" is not overly
important as this is to store an environment that is not
going to do much shrinking.

Any help someone could give me would be appreciated.
Either e-mail me (I'll summarize) or post direct.

Thanks,
Lonnie

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Email to: lonhyn at eniac.seas.upenn.edu    Smail To: /dev/null

Disclaimer: All views and opinions expressed here belong
   entirely to the organization mentioned above.  They
   have sole rights to my every waking thought.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



More information about the Comp.unix.wizards mailing list