On Tue, Jun 30, 2020 at 1:52 PM 孙世龙 sunshilong <sunshilong369@gmail.com> wrote:
Hi, list
      Is there some method or software that could purposely generate a lot
of physical memory fragmentations on Linux?

     I need to do some tests under such circumstances.

    Thank you for your attention to this matter.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Hi

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
--
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com