lkml.org 
[lkml]   [2008]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectCalling free_pages on part of the memory returned by get_free_pages?
According to LDD3, if I call get_free_pages() to allocate X bytes, I have to
free all of those pages with free_pages(). The VM internals are a little bit
over my head, but I looked at the code and I didn't see why that is a requirement.

For example, let's say I want to allocated 6MB of physically-contiguous memory.
If I call x = get_free_pages(11) to get 8MB. What happens if I then do
"free_pages(x + 6 * 1024 * 1024, 9)"?

I remember doing this on the 2.4 kernel, and it never gave me any problems.

--
Timur Tabi
Linux kernel developer at Freescale


\
 
 \ /
  Last update: 2008-04-21 23:15    [W:0.852 / U:0.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site