Path: utzoo!utgpu!watmath!clyde!att!rutgers!mailrus!eecae!netnews.upenn.edu!eniac.seas.upenn.edu!lonhyn From: lonhyn@eniac.seas.upenn.edu (Lonhyn Jasinsky) Newsgroups: comp.unix.wizards Subject: Parcelling out shared memory Keywords: shared_mem malloc Message-ID: <6490@netnews.upenn.edu> Date: 2 Dec 88 22:27:47 GMT Sender: news@netnews.upenn.edu Reply-To: lonhyn@eniac.seas.upenn.edu (Lonhyn Jasinskyj) Distribution: na Organization: University of Pennsylvania Lines: 39 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@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. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=