ntdll: Fixed some heap allocation stalls
Steaphan Greene
steaphan at gmail.com
Fri Nov 2 16:35:58 CDT 2012
Running a game in wine showed it performing terribly. I traced this to
the fact that it allocates and deallocates tiny memory chunks over and
over (I suspect it's in C++ and passing things by value everywhere).
This led to huge stalls because the heap bins weren't fine-grained
enough (these differed in size in steps of 8 bytes, but the bins
differed by 16+, so it spent a lot of time searching each bin for a
bigger block). I added more fine-grained sizes to the smaller end of
this, and now it runs faster in wine than it does natively. :)
This was run on Debian squeeze, amd64.
Note, this is my first submission to wine in nearly 15 years. So, of
course, everything has changed with how this works now. Hope I have
this all right.
---
dlls/ntdll/heap.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--
Steaphan Greene<steaphan at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ntdll-Fixed-some-heap-allocation-stalls.patch
Type: text/x-patch
Size: 1001 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20121102/68e4f76e/attachment.bin>
More information about the wine-patches
mailing list