Date: Fri, 8 Dec 1995 22:18:20 From: "Alaric B. Williams" Reply-To: DJGPP AT abwillms DOT demon DOT co DOT uk To: DJGPP AT sun DOT soe DOT clarkson DOT edu Subject: Re: Overlaying Lines: 27 In your message dated Friday 8, December 1995 you wrote : > In my emacs that I am writing in Gnu C++, there is a fair length of program > text which is obeyed once on starting and not again. I can't call it as a > child process, as if I did the child would need to know many subroutine entry > addresses in the parent and to write to arrays in the parent. To save space, > is there any way I can get a particular subroutine X() to be put right at the > top end of the fully assembled program, so that after running it I can (how?) > move the start-of-free-store pointer back down to release the space occupied > by the code of X()? Is there a way to find the start and finish of the memory > occupied by subroutine X()?, so I can cannibalize it for work space. I've seen a DLL library for DJGPP somewhere. That might allow you to put the initialiser into an external library, link it in, use it, then free it up again. Just I dunno where. What would be nice is a relocator that can malloc a buffer and plonk a COFF binary in, with some mechanism for it to provide entry points etc. This could be made quite portable, IMHO. Regards, ABW -- Alaric B. Williams (alaric AT abwillms DOT demon DOT co DOT uk) "A man walks into a bar, right, and he goes 'ouch' coz it's an iron bar"