문제

If I have a 2 GB ram and I have an 2 instances of an Object which is 1.5 GB each, the operating system will help and context switch the pages to and from harddisk.

What if I have 1 instances but is 3 GB. Can the same paging method breakdown this instances into 2 pages? Or will I encounter out-of-memory issue?

I will also like to apply the same question to other data structures beside object, will the paging page it as a whole, or will it break it into smaller units.

Thanks.

도움이 되었습니까?

해결책

The operating system has no concept of "Objects", only memory pages. Your object will be made up of many memory pages which the OS can swap in and out of real memory independently of each other. Page size varies with operating systems, but is typically 4K.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top