3 ms·
That would be levels and levels of indirection because 32K can be loaded at once and to address 2G in 32K chunks you need over 32K just for the address of the b
by lynguist 3y ago
That would be levels and levels of indirection because 32K can be loaded at once and to address 2G in 32K chunks you need over 32K just for the address of the block. And then you need a part of the code loaded that actually does that swapping. You would need at least 3 levels for every memory address. Each 32K chunk would have its own address that would be loaded from two 32K chunks, that’s how giant its address is. And then that block would be loaded in.
I think that it would be literally impossible to have random access memory of 2G.
- torgoguys 3y agoI'm not sure what you mean. 4gb is 31-bits (<4 bytes) of address space. If each page had 32K of address space (15 bits), that would require 64K different pages, which just requires the remaining 16 bits of the 31 bits to identify it. So the block address is just 2 bytes long, not 32K bytes. For these paged systems, you typically swap in the the page you're interested (iirc, gameboy did it by writing the page number to particular memory addresses) and then work with it for a while, and often execute code directly contained in it, which will eventually lead to loading the next page you need when you need it.