linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Joseph A. Knapka" <jknapka@earthlink.net>
To: Bulent Abali <abali@us.ibm.com>
Cc: linux-mm@kvack.org
Subject: Re: order of matching alloc_pages/free_pages call pairs.  Are they always same?
Date: Sat, 26 May 2001 21:12:35 -0600	[thread overview]
Message-ID: <3B1070A3.D43B4A63@earthlink.net> (raw)
In-Reply-To: <OF5385EE96.412D8BDB-ON85256A58.005E44E7@pok.ibm.com>

Bulent Abali wrote:
> 
> Is it reasonable to assume that matching
> alloc_pages/free_pages pairs will always have the same order
> as the 2nd argument?
> 
> For example
> pg = alloc_pages( , aorder);   free_pages(pg, forder);
> Is (aorder == forder) always true?
> 
> Or, are there any bizarro drivers etc which will intentionally
> free partial amounts, that is (forder < aorder)?

This would be a somewhat bizarre thing to do, but after thinking
about it a bit, I believe it would work fine - as long as you're
very careful to free blocks with appropriate order and alignment.

I'm not personally aware of any code that actually frees sub-blocks
of allocated blocks, but I expect that when I get around to looking
at the slab allocator (kmalloc(), kfree()) there will be code
in there that does so.

-- Joe


-- Joseph A. Knapka
"If I ever get reincarnated... let me make certain I don't come back
 as a paperclip." -- protagonist, H Murakami's "Hard-boiled Wonderland"
// Linux MM Documentation in progress:
// http://home.earthlink.net/~jknapka/linux-mm/vmoutline.html
* Evolution is an "unproven theory" in the same sense that gravity is. *
--
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-mm.org/

  reply	other threads:[~2001-05-27  3:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-26 17:10 Bulent Abali
2001-05-27  3:12 ` Joseph A. Knapka [this message]
2001-05-29 16:24 ` Timur Tabi

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=3B1070A3.D43B4A63@earthlink.net \
    --to=jknapka@earthlink.net \
    --cc=abali@us.ibm.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