[Coco] Does NitrOS9 limit apps to =<64K?

Robert Gault robert.gault at worldnet.att.net
Tue Aug 10 10:56:44 EDT 2004


David J Bush wrote:

> I'm not talking about the size of the object code. I mean
> giving the app access to as much of the full 512K (or 2M)
> as possible, for data.
> 
> Is it possible for an app to send a request to Nitros9
> to gain at least partial access to the MMU? Something like
> "I want to use N 8K pages of physical memory" and Nitros9
> could respond with "Here they are, you can refer to them
> as pages 0 to N-1" Maybe this request would occur when
> the module for that app is loaded. I suppose the app would
> also have to request K logical pages as well, and the OS
> would respond with "You may directly address this list of
> logical pages." Then during execution the app could say
> "I want logical page i to point to physical page j". This
> runs a bit contrary to the idea of OS9 being able to move
> modules around in memory any way it wants, but the 64K
> limit on app size really puts a crimp on capabilities.
> 
> Maybe it would be simpler for a file to be executable by
> OS9 (position-independent code, etc.) but the moment it
> starts running, it takes control of the machine, with its
> own disk driver, printer driver, etc. It takes over the
> MMU and trashes OS9 and any apps that were loaded into RAM.
> Then, when you exit this program, OS9 will automatically
> reboot.
> 
> One possible example would be a text editor or word 
> processor that could hold very large documents in RAM all
> at once. This is just a CoCo, after all. It's not like
> you had some crucial background task you need to keep
> running while this app is running. One big job at a time
> is all you really need to be able to do. Multitasking is
> a fantastic capability for an OS on such a small machine,
> but just because you can do something doesn't mean you
> have to.
> 
> Thanks for your time.
> 
> David
> 
> 
> 
> 
> 
> 

Do some experimenting with Allocate RAM os9 F$AllRAM, Allocate High RAM 
os9 F$AllHRAM, map specific block os9 F$MapBlk, clear specified block 
os9 F$ClrBlk, and deallocate RAM blocks os9 F$DelRAM.

You will find that you can assign chunks of RAM much larger than your 
64K User address space. Map into your address space as many blocks as 
you can fit, when and as you need them.

You should be able to have about as much control of your Coco's memory 
as you would from Disk Basic. These blocks when mapped into your user 
space can be used for anything, cached data, text, graphics. Just 
remember to unmap and deallocate them or you will produce the equivalent 
of a memory leak.




More information about the Coco mailing list