Is there some method or software that could purposely generate a lot of physical memory fragmentations on linux?
孙世龙 sunshilong
sunshilong369 at gmail.com
Fri Jul 3 01:20:50 EDT 2020
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
fragmentation".
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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20200703/17023acb/attachment.html>
More information about the Kernelnewbies
mailing list