How to avoid heap fragmentation?

前端 未结 9 1397
一个人的身影
一个人的身影 2020-12-05 08:14

I\'m currently working on a project for medical image processing, that needs a huge amount of memory. Is there anything I can do to avoid heap fragmentation and to speed up

9条回答
  •  鱼传尺愫
    2020-12-05 08:59

    Without much more information about the problem (for example language), one thing you can do is to avoid allocation churn by reusing allocations and not allocate, operate and free. Allocator such as dlmalloc handles fragmentation better than Win32 heaps.

提交回复
热议问题