My old post on Memory mapped files made me think about how to implement some technology that is rare in current software knowledge bases.
This lead me to delve into my memory for this website ... a strong and free memory manager is available here
http://www.paulnettle.com/
Listen to the music ...
The concept is simple ... to replace the hash table memory management system here by removing calls to malloc and to simply use a memory mapped file to map large areas of the disk to the process, the limitation is theoretically the address space of the program, but normal practical terms limits this to 2GB even for 64 bit applications (citation needed). This means technically that I can have computers use 2GB RAM and 2GB RAM for free!
http://msdn.microsoft.com/en-us/library/windows/desktop/aa366761(v=vs.85).aspx
The function MapViewOfFile(...)
The gives access to a portion of the file in memory, so if for example I open a 2GB file then I can map a portion, say 1MB at the 1.5GB boundary, and all I have to do is supply the numbers for the offsets into the file, then I have 1MB from the 2GB data pool to read and write to. I think this explains why I need a decent memory management implementation to work with.
Well I guess it isn't actually that rare ... but most programs do use RAM
ReplyDelete