[Wine] Memory leaks

Rico Schüller kgbricola at web.de
Sat Dec 22 08:04:46 CST 2007


Hi,

I wrote a small windows program (msgbox.exe) and run it like that:
WINEDEBUG=+heap wine msgbox.exe. In the output there is the memory at
address 0x110118 allocated more than once without a free. It is shown in
the "output" (I snipped out a lot of unnecessary stuff). In the analyses
of the complete output there is this memory address allocated 4 times
and only 2 times freed. The code from the "msgbox.exe" is in the section
code.

Is there a problem in the heap-functions or isn't it a problem?
Is it OK that a program gets two times the same memory space?
Could anyone reproduce this problem?

Cheers
Rico

output:
trace:heap:RtlAllocateHeap (0x110000,00000002,00000014): returning 0x110118
trace:heap:RtlAllocateHeap (0x110000,00000002,00000054): returning 0x110138
trace:heap:RtlAllocateHeap (0x110000,00000002,00000014): returning 0x110198
trace:heap:RtlFreeHeap (0x110000,00000002,0x110118): returning TRUE
trace:heap:RtlAllocateHeap (0x110000,00000002,0000001a): returning 0x1101b8
trace:heap:RtlAllocateHeap (0x110000,00000002,00000054): returning 0x1101e0
trace:heap:RtlAllocateHeap (0x110000,00000002,0000001a): returning 0x110240
trace:heap:RtlFreeHeap (0x110000,00000002,0x1101b8): returning TRUE
trace:heap:RtlAllocateHeap (0x110000,00000002,00000004): returning 0x110118
-- snip
trace:heap:RtlAllocateHeap (0x110000,00000002,00000014): returning 0x110118
trace:heap:RtlAllocateHeap (0x110000,00000002,00000054): returning 0x110138
trace:heap:RtlAllocateHeap (0x110000,00000002,00000014): returning 0x110198
trace:heap:RtlFreeHeap (0x110000,00000002,0x110118): returning TRUE
trace:heap:RtlAllocateHeap (0x110000,00000002,0000001a): returning 0x1101b8
trace:heap:RtlAllocateHeap (0x110000,00000002,00000054): returning 0x1101e0
trace:heap:RtlAllocateHeap (0x110000,00000002,0000001a): returning 0x110240
trace:heap:RtlFreeHeap (0x110000,00000002,0x1101b8): returning TRUE
trace:heap:RtlAllocateHeap (0x110000,00000002,00000004): returning 0x110118
-- snip

code:
#include <windows.h>

int WINAPI WinMain (HINSTANCE hThisInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR lpszArgument,
                     int nCmdShow)
{
    MessageBox(NULL, "Hallo", "Test", MB_OK);
    return 0;
}



More information about the wine-users mailing list