If the default page size is 4kb and I request 8kb, what will the OS, and more specifically Linux do? I have some theories for this

  • OS will return a single page with 8KB each.
  • OS will return 2 virtual pages: each one is 4kb. In a case like this, how can the operating system translate any address in those 2 pages?

Please tell me what is the correct solution.


1 Answer 1


The memory is always handled in multiples of pages. If you ask the operating system (not the C's library malloc, that handles space on a pool of pages and can hand out fractions of a page) for a page, you get a page, if you ask for 10, 10 pages it is.

  • You mean the application will speak to OS: "Please provide for me 10 pages. each page is 4kb", not "Please provide for me 40kb" ?
    – hqt
    May 4, 2020 at 4:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .