Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!gatech!purdue!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!unido!sbsvax!roeder From: roeder@sbsvax.UUCP (Edgar Roeder) Newsgroups: comp.sys.atari.st Subject: Re: Gulam problem Summary: memory is always owned by process who called Malloc() Message-ID: <531@sbsvax.UUCP> Date: 11 Jul 88 16:55:09 GMT References: <19880710165749.2.JRD@MOA.SCRC.Symbolics.COM> Organization: Universitaet des Saarlandes, Saarbruecken, West Germany Lines: 21 I have had the same problems with my shell (Master V5.0). If Gulam allocates memory (for making history-entries etc.) inside a system()-call, TOS gives this memory to the currently running program (and this is your MAKE). After your MAKE has finished, the memory is cleared and all eventual housekeeping- information of the local Gulam-malloc() is erased. Because Gulam uses its own blocks of memory (about 16k) this problem shows up only after some time (when these 16k are all used up and a new Malloc()-call has to be done). There are several solutions to this problem: - try to get enough memory to the local (Gulam-)pool before running your program, - tell TOS, that the current program is Gulam (this is very difficult to manage), or - make your programs data space resident by calling Ptermres(0,0L) (after Free()-ing all your locally Malloc()-ated blocks) - inherit all your memory to the calling process (difficult, you have to access the list of allocated memory-blocks and change the owner) - use Master, it has no such problems (:-) I hope this will clarify the situation a bit. Edgar