From: "Chris Friesen" <cfriesen@nortel.com>
To: linux-kernel@vger.kernel.org
Subject: how to purposfully fragment memory?
Date: Tue, 20 Mar 2007 11:43:56 -0600 [thread overview]
Message-ID: <46001D5C.3020406@nortel.com> (raw)
I'm trying to test code paths dealing with fragmented memory, so I'd
like to have a simple way to cause fragmented memory in the kernel. Is
there any API in the kernel that would let me allocate two contiguous
pages, then free one of them?
I tried the following, but it triggers an oops in free_page():
unsigned long addr =
__get_free_pages(GFP_KERNEL|__GFP_NORETRY|__GFP_NOWARN, 1);
if (!addr)
break;
free_page(addr+4096);
Thanks,
Chris
next reply other threads:[~2007-03-20 17:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-20 17:43 Chris Friesen [this message]
[not found] ` <a8f16e2b0703201215q78dfdd3du54c77be7c9d843e0@mail.gmail.com>
[not found] ` <4600393C.8030401@nortel.com>
2007-03-20 21:34 ` how to purposfully fragment memory? Dan Kruchinin
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=46001D5C.3020406@nortel.com \
--to=cfriesen@nortel.com \
--cc=linux-kernel@vger.kernel.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