Kernel Newbies archive on
 help / color / Atom feed
From: "孙世龙 sunshilong" <>
	"Valdis Klētnieks" <>,
Subject: Re: Is there some method or software that could purposely generate a lot of physical memory fragmentations on linux?
Date: Fri, 3 Jul 2020 13:20:50 +0800
Message-ID: <> (raw)
In-Reply-To: <>

[-- Attachment #1.1: Type: text/plain, Size: 884 bytes --]

Hi, Valdis Klētnieks, Mulyadi Santosa

Thanks to both of you.
>> Just pseudo idea, if this is in user space, try to:  allocate many blocks
>> of memory using malloc, each having different size, keep the returned
>> pointer, then randomly free() some of them, then malloc() again with
>> different size

>That will cause userspace malloc() to have fragmentation, but as far
>as the kernel is concerned it's all just 4K pages of user memory.
>Causing physical memory fragmentation will require abusing the kernel
>memory allocators such as kmalloc() and vmalloc() and friends.

I fully understand what you mean by "cause userspace malloc() to have
I am sorry, maybe I mislead you. I just want there are no available free
high order blocks(i.e
32KB,64KB, 128KB and etc) on the platform.
How can I more efficiently and automatically achieve this goal?

[-- Attachment #1.2: Type: text/html, Size: 1011 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

Kernelnewbies mailing list

      parent reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30  6:51 孙世龙 sunshilong
2020-07-02  8:29 ` Mulyadi Santosa
2020-07-03  4:58   ` Valdis Klētnieks
2020-07-03  5:20 ` 孙世龙 sunshilong [this message]

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Kernel Newbies archive on

Archives are clonable:
	git clone --mirror kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ \
	public-inbox-index kernelnewbies

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone