The memory consumed by the original heap is reclaimed when the init-data segment is discarded (which happens at the end of system initialization).
Once everything has been copied and all the pointers fixed up, the global memory manager heap pointers are changed to point at the new (“real”) heap and the original heap is abandoned. Next, the memory manager starts looking for the real memory in the system, and when it finds some, it allocates memory (from the initial fixed block) to keep track of the real memory.Īfter the memory manager has found all the real memory in the system, it’s time to initialize the memory manager a second time: It carves out a chunk of that real memory to use as the “real heap” and copies the information from the heap that it has been using so far (the fixed-sized heap) to the “real heap”. So now there is a heap available to satisfy memory allocations. It sets up this fixed block as the memory manager heap. The first time the memory manager is initialized, it gets all its memory from a fixed block of memory preallocated in the init-data segment. The solution is to initialize the memory manager twice. (Keeping track of which pages are paged in and which are paged out, that sort of thing.) But it can’t allocate memory until the memory manager is initialized. But now you have a chicken-and-egg problem: The memory manager needs to allocate some memory in order to keep track of the memory it is managing.
#Windows 95/98/se/me ram limitation patch windows#
One of the first things that happens in the Windows 95 boot process once you have transitioned into 32-bit mode is to initialize the 32-bit memory manager. Windows 98 bumped the limit to 1GB because there existed a vendor (who shall remain nameless) who was insane enough to want to sell machines with 1GB of RAM and preinstall Windows 98 instead of the much more suitable Windows NT.
One of my friends got 96MB of memory on his machine to test that we didn’t tank under “insanely huge memory configurations” and we all drooled.)
So according to Moore’s law, that gave us seven years before we had to do something about it. Remember, Windows 95’s target machine was a 4MB 386SX and a powerful machine had 16MB. (This was considered an insane amount of memory back then. Windows 95 will fail to boot if you have more than around 480MB of memory.