Demand-paged

mikeshn

Senior member
Oct 9, 2001
367
0
0
I read article about Linux. Can someone explain to me what
"The kernel supports demand-paged, loaded executables" demand-paged means.

Thanks
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
The Linux kernel memory maps executables and shared libraries (via the same method as mmap()'d files), and it only loads parts into memory as they're needed for execution. This also makes freeing memory easier because the VM can just free the pages used by the binary, because they'll be reread into memory if they're needed again, no need to swap them out.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
It's defined right after it's mentioned: The kernel supports demand-paged, loaded executables. Only those segments of a program which are actually in use are read into memory from disk