Skip to content

kernelbase: Implement HeapSummary

Julius Bettin requested to merge ningvin/wine:implement-heap-summary into master

I tripped over this function while trying to run a game, so I thought I would have a go at it :-)

The implementation is very similar to what is done in Local32Info16 already.

Regarding the place to put the function: I am not sure about the exact relationship between kernel32 and kernelbase, but as most of the heap related functions are implemented in kernelbase I opted to add it to the latter. The tests reside in the kernel32 directory though.

The tests are currently pretty basic as I was a bit hesitant to compare against hard coded sizes for reserved / committed memory (that could break if someone made changes to the heap implementation).

Also, I am not entirely sure about the semantics of the cbMaxReserve field. I opted to always set it to the same value as cbReserved, which seems good enough™.

Let me know if this needs improvement!

Merge request reports

Loading