3 ms·
My recent allocator design is an attempt to address memory fragmentation in Windows XP & Vista. The unique problem I faced was that there was significant amount
by kvs 17y ago
My recent allocator design is an attempt to address memory fragmentation in Windows XP & Vista. The unique problem I faced was that there was significant amount of code already in place which used C++ new/delete (about 300KLOC) and lot of coding is ongoing at breakneck speed. The allocator is written in C++.
My story:
- Profiled the code to figure out allocation sizes and number of allocations.
* Found most objects are 32, 64, 128 bytes and we allocate millions of them.
* Allocation rate is linear in the sense, rate of allocation is pretty steady within a time window.
* Life time of these objects are long; Majority of them (99.9%) lasts as long as the application itself.
* Found couple of large allocations in the range of 64MB to 128MB
Can you tell me yours? With such detail, then perhaps we can figure out what's best for you? :-)
- slackerIII 17y agoDid you try the windows low-fragmentation heap? I've seen it used very successfully.
- kvs 17y agoYes. That didn't work to our satisfaction.