Hacker News new | past | comments | ask | show | jobs | submit login

Confession: Back in the day, before Macs had a real virtual memory system, I abused the Resource Manager and a file's resource fork to serve as a crude VM for an object management library I created so that I could write apps that used more C++ objects than would fit in memory. It was a hack, but it worked surprisingly well.



> I abused the Resource Manager and a file's resource fork to serve as a crude VM

Abused? That’s what it was designed to be. https://www.folklore.org/The_Grand_Unified_Model.html:

“Thankfully, I knew of a similar system in Smalltalk, an object-oriented virtual memory called OOZE that was designed by Ted Kaehler, that swapped objects in and out of main memory as required. This was my inspiration for the Resource Manager. Find out more about OOZE here”


I think the Resource Manager was designed with the "objects" in mind being understood to be an application's assets, such as code, graphics, menus, text, and so on. My abuse was to extend this to arbitrary, dynamically allocated blobs so that an app could, for example, scan thousands of files and store each file's metadata in virtual memory, way beyond what would fit in RAM.


How long ago? The resource fork was limited to 16 MB (it used 24-bit pointers in some places), so you can't have been swapping that much data out.


This would have been in the early 1990s, I'd guess.

EDIT: I just checked the sources: it was mid 1993. Back then, a Macintosh Classic II would have been a common machine and shipped with 2 MB of RAM. Older machines often had only 1 MB of RAM.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: