mdr7527@ritcv.UUCP (07/21/87)
Can anyone tell me how I can use lower RAM area using Malloc or something similar. Apparently the lower 120K can not be gotten to easily because TOS uses that address range even if it is in ROM. Is this correct? Thanks for any help. Mark
gert@nikhefh.UUCP (Gert Poletiek) (07/22/87)
In article <580@ritcv.UUCP> mdr7527@ritcv.UUCP (PUT YOUR NAME HERE) writes: >Can anyone tell me how I can use lower RAM area using Malloc or something >similar. Apparently the lower 120K can not be gotten to easily because >TOS uses that address range even if it is in ROM. Is this correct? > > Thanks for any help. > Mark You might be able to imagine that an operating system needs some data space to do its work. In the lower 120K of memory are data spaces for the BIOS, XBIOS, GemDos, VDI and AES. Malloc is a bit simple minded on the ST, but at least it does not allow you to tamper with those 120K. And unless you are writing your own operating system you should keep your hands off every part of those 120K except for the documented system variables. Gert Poletiek
apratt@atari.UUCP (Allan Pratt) (07/22/87)
in article <580@ritcv.UUCP>, mdr7527@ritcv.UUCP (Mark Rogalski) says: > > Can anyone tell me how I can use lower RAM area using Malloc or something > similar. Apparently the lower 120K can not be gotten to easily because > TOS uses that address range even if it is in ROM. Is this correct? > > Thanks for any help. > Mark Your question is hard to answer because I can't figure out what you mean. Malloc allocates a (previously free) chunk of RAM for your use, and you are expected to Mfree it later. When your process terminates, that memory is freed for you. When TOS is in ROM it still has to use *some* RAM, right? For its variables and things. In my system, with a hard-disk driver, FLDR100, and a 128K RAMdisk, the first program loads at about 200K. The point is you don't have to care where your program loads, because TOS will relocate it for you. Also, when you start up, you get the largest free chunk of memory, so I don't know why you need more. Finally, there are some locations in low memory (at and above $400) which are "system variables" -- variables you can change to alter system behavior. You have to be Supervisor to change these. If this doesn't answer your question, please rephrase it and I'll try again. /----------------------------------------------\ | Opinions expressed above do not necessarily | -- Allan Pratt, Atari Corp. | reflect those of Atari Corp. or anyone else. | ...lll-lcc!atari!apratt \----------------------------------------------/ (APRATT on GEnie)