Click here to Skip to main content
15,889,992 members
Please Sign up or sign in to vote.
1.80/5 (2 votes)
See more:
if a pte's present bit is clear, how does the kernel know where it lies in harddisk, and transfer it back to physic memory. Yes i know the LBA mode of harddisk which says all memory can be accessed by their ordinal,but nowadays 500G is a common capacity of harddisk,the address line of 80x86 is 32,which addrss up to 4GB,then how does it deal whith 500G or 1TB,and differenciate with the physical address space?
Thanks advance!
Posted

1 solution

Who told you that the position in file streams are 32-bit? Usually, uint64 type is used for that. Of course, you cannot always map the whole file onto physical memory, but you don't really need it, even in 64-bit instruction-set architectures which also use uint64 pointers in flat memory space.

—SA
 
Share this answer
 
Comments
xiahan1994 23-Jun-13 16:52pm    
do you mean their has 64 addree lines or only a little address lines but send the address where the file located in harddisk several times in address line? just like if there is 32 address lines and the address is specified use uint64 type so we send the address twice.
Sergey Alexandrovich Kryukov 23-Jun-13 23:44pm    
What address? Stream position is 64-bit number. If you want, call it "address". There is not such thing as 32-bit "address".
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900