* __get_free_pages and free_page
@ 2000-06-29 22:59 Timur Tabi
0 siblings, 0 replies; only message in thread
From: Timur Tabi @ 2000-06-29 22:59 UTC (permalink / raw)
To: Linux MM mailing list
Let's say I allocate a block of memory with __get_free_pages, which requires
that I specify the order. To free the memory, I need to call free_pages, also
specifying the same order.
What happens if I specify a smaller order? Will it free a subset of that block?
Example:
unsigned long addr;
addr = __get_free_pages(GFP_ATOMIC, 3); // allocate 2^3 pages = 32KB
free_pages(addr, 2); // frees the 1st 16KB only???
addr += 16384; // addr points to 2nd 16KB block
At this point, will addr point to a valid 16KB block of memory? Will the heap
be intact? Or will it screw things up?
This is with Linux 2.4.
--
Timur Tabi - ttabi@interactivesi.com
Interactive Silicon - http://www.interactivesi.com
When replying to a mailing-list message, please don't cc: me, because then I'll just get two copies of the same message.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-06-29 22:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-29 22:59 __get_free_pages and free_page Timur Tabi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox