Results 1 to 3 of 3
Hi,
I am not able to find the answers to the following questions, please help:
1. Can a program ask for contiguous physical memory, say 8KB of memory from the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-09-2011 #1Just Joined!
- Join Date
- Jun 2010
- Posts
- 6
physical memory allocation
Hi,
I am not able to find the answers to the following questions, please help:
1. Can a program ask for contiguous physical memory, say 8KB of memory from the kernel?
2. If yes, what does kernel do when a program ask for a 8KB chunk? Can the kernel break the 8KB into two 4KB pages? Does these 2 pages allocated have to be contiguous?
Thanks!
- 01-12-2011 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,141
I'm not positive about the contiguous part. If you ask for a multiple of pages, the kernel doesn't have to make sure that they are contiguous, but my guess is that if there are two pages contiguous, it will provide them. Since the general page size is, as you noted, 4K, then an 8K request can be any two physical chunks of RAM, but would be contiguous in VM. So, is there a reason for this question, other than the (admirable) desire to increase your knowledge?
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 01-15-2011 #3Just Joined!
- Join Date
- Jun 2010
- Posts
- 6


Reply With Quote

