Mac OS 9 Discussion > Mac OS 9, Hacks & Upgrades

Mac OS 9.2.2 Memory Limit of 1.5 GB... Some Answers

(1/35) > >>

nanopico:
So you install 2 GB of ram and OS 9.  Then you go to about this mac and you see that hey the system recognizes that there is 2GB of ram!!! And you get all excited until you notice that Mac OS takes up 512-540 MB (give or take) 
This is not new I know.  DieHard pointed the out to me and directed me towards this discussion
http://macos9lives.com/smforum/index.php?topic=2101.msg10905#msg10905

I've posted elsewhere some theory's I had while examining memory.
So using an iBook with 320 MB of ram I found that the system heap and stack along with some rom space and some other system stuff sits at the bottom of ram (starting at or around address 00002800).  Once the process manager starts it claims the rest of the memory for it's heap except for a little bit at the top which it is allocated for it's stack.
For those of you who don't know, the heap is the working memory where your data is stored and the stack is the memory where the actually executable code is stored.  Because os 9 does not have protected memory you can write apps that pretty much read anything.  With protected memory apps are usually given a virtual address space so it thinks it starts at address 0 the os then translate that to physical addresses.  The heap for the app is then marked as non-executable though on some systems you can override that ins some creative ways.
Back on track though.  So when the system boots it get's the ram size information from Open Firmware.  The memory manager I believe starts before the process manager (don't quote me on that as I haven't confirmed this yet). So the os is fully aware at this point of the 2 GB installed.  Depending on which starts first will be where the ram get's allocated to the process manager. When about this mac shows that MacOS takes 540 MB it's actually not really true.
Looking at the heaps and stack allocations, the system files are still only taking 30-40 or whatever your system uses depending on extensions and what not.
For MacOS memory usage (which is not handled by the process manager) it takes the total ram installed and subtracts what is allocated to the process manager, and assumes what is left is allocated to the system.
So that is where the number comes from.
So poking around with MacsBug you can look at what is in the ram above 1.5 gb.  Guys what there is nothing (no surprise there).  It's all initialized to zero.
So next step is to write a program to put data into memory addresses above the 1.GB limit.
Then use MacsBug to verify it is there.  If that works then it tells us that the memory is addressable and the potential of some sort of ram disk up there is possible (though not necessarily easy in any way).
Just thought I'd share this bit of info.

DieHard:
Wow.... you kinda remind me of iMic's brother... you are going where nobody went before.. Awesome work ! :)

nanopico:
Thanks. I just hope I can actually produce something with all my findings.

Philgood:
Let's get started!
Will 2016 be the year of somewhat bigger for our beloved OS9...maybe we can get the attention of some former Apple engineers to help us

MacTron:

--- Quote from: nanopico on November 19, 2015, 08:21:24 PM ---For MacOS memory usage (which is not handled by the process manager) it takes the total ram installed and subtracts what is allocated to the process manager, and assumes what is left is allocated to the system.
So that is where the number comes from.
So poking around with MacsBug you can look at what is in the ram above 1.5 gb.  Guys what there is nothing (no surprise there).  It's all initialized to zero.
So next step is to write a program to put data into memory addresses above the 1.GB limit.
Then use MacsBug to verify it is there.  If that works then it tells us that the memory is addressable and the potential of some sort of ram disk up there is possible (though not necessarily easy in any way).
Just thought I'd share this bit of info.

--- End quote ---

This is becoming into something really interesting ...  :)

Navigation

[0] Message Index

[#] Next page

Go to full version