jackson@mprvaxa.UUCP (Taylor Jackson) (12/12/85)
I'm having trouble with malloc, e.g. any function call previous to malloc causes it to fail (can't allocate memory for x bytes). Any suggestions? Taylor Jackson
tynor@gitpyr.UUCP (Steve Tynor) (12/13/85)
In article <673@mprvaxa.UUCP> jackson@mprvaxa.UUCP (Taylor Jackson) writes: >I'm having trouble with malloc, e.g. any function call previous to malloc >causes it to fail (can't allocate memory for x bytes). Any suggestions? >Taylor Jackson > I had the same problem and called Richard Frick... It turns out that TOS gives up all of memory to the application. (seems pretty stupid to me). So in order to use Malloc, you have to first use Mfree to free up some memory. Now what I haven't figured out is how to determine where to start the Mfree????? It seems non-deterministic since depending on how many desk-accessories are loaded, the application will be loaded at various locations in memory... Any ideas? Steve Tynor
jrm%computer-science.strathclyde.ac.uk@UCL-CS.ARPA (12/16/85)
U guys seem to have hit a problem I ran into some months ago. Im my case I was using the developers kit. The patch involved setting up a "truncate" call after the application program was entered, but before the real "main" subroutine was called. "_end" marked the end of the data space for the job. If U are using the developers kit, then U have an out of date start-up routine. Later distributions of the software (gems and/or gemstart.o) do the memory deallocate for you at start-up. Buzz me if U want more specific help. Jon R Malone