dbghelp[1]: Speed up vector_add by avoiding pool_realloc calls. Remove no longer needed pool_realloc.

Markus Amsler markus.amsler at oribi.org
Mon May 14 19:04:57 CDT 2007

I tried several approaches to avoid the memory leak still present after 
this patch. But all of them used more memory, were more complex and 
slower. I tried HeapCreate for pools, separate HeapAlloc, HeapReAlloc 
for buckets, using HeapAlloc for pool_alloc with storing the pointer in 
the pool. I even implemented a simple radix tree for the bucket storage.

The initial bucket size has no measurable effect, so I left it at 1 to 
save some bytes.

Here the stats for this series:
              A kB   B kB    C s   D kB
orig         10920  55036   115   146388
dbghelp[1]   10664  52372   48    92448
dbghelp[2]   10668  52604   16    92632
dbghelp[3]   10632  52604   7     92632
dbghelp[4]   7444   50256   7     90452

A: Memory after startup
B: Memory normal symbol
C: Time to load big debug file
D: Memory after big debug file loaded

   dlls/dbghelp/dbghelp_private.h |    3 +-
   dlls/dbghelp/storage.c         |   47
   2 files changed, 18 insertions(+), 32 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 13dc5451898e432df428b5600898b7a46647cd0f.diff
Type: text/x-patch
Size: 3265 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070515/1a612e3c/13dc5451898e432df428b5600898b7a46647cd0f.bin

More information about the wine-patches mailing list