Is there some method or software that could purposely generate a lot of physical memory fragmentations on linux?

Valdis Kl=?utf-8?Q?=c4=93?=tnieks valdis.kletnieks at vt.edu
Fri Jul 3 00:58:37 EDT 2020


On Thu, 02 Jul 2020 15:29:18 +0700, Mulyadi Santosa said:

> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20200703/98c7b2b9/attachment.sig>


More information about the Kernelnewbies mailing list