From: Timur Tabi <ttabi@interactivesi.com>
To: Linux MM mailing list <linux-mm@kvack.org>
Subject: __get_free_pages and free_page
Date: Thu, 29 Jun 2000 17:59:23 -0500 [thread overview]
Message-ID: <20000629231053Z131172-21003+63@kanga.kvack.org> (raw)
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/
reply other threads:[~2000-06-29 22:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20000629231053Z131172-21003+63@kanga.kvack.org \
--to=ttabi@interactivesi.com \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox