diff --git a/debugger/debugger.h b/debugger/debugger.h index 24d3bb4bbec..1c7b9ed67d7 100644 --- a/debugger/debugger.h +++ b/debugger/debugger.h @@ -451,8 +451,8 @@ extern char* DEBUG_XStrDup(const char *str); work, etc... if someone could make optimized routines so it wouldn't take so long to load, it could be made default) */ #include "heap.h" -#define DBG_alloc(x) HEAP_xalloc(dbg_heap,0,x) -#define DBG_realloc(x,y) HEAP_xrealloc(dbg_heap,0,x,y) +#define DBG_alloc(x) HeapAlloc(dbg_heap,0,x) +#define DBG_realloc(x,y) HeapRealloc(dbg_heap,0,x,y) #define DBG_free(x) HeapFree(dbg_heap,0,x) #define DBG_strdup(x) HEAP_strdupA(dbg_heap,0,x) #define DBG_need_heap diff --git a/include/heap.h b/include/heap.h index dc0093cca4b..21180fa513d 100644 --- a/include/heap.h +++ b/include/heap.h @@ -17,7 +17,6 @@ extern HANDLE SegptrHeap; extern int HEAP_IsInsideHeap( HANDLE heap, DWORD flags, LPCVOID ptr ); extern SEGPTR HEAP_GetSegptr( HANDLE heap, DWORD flags, LPCVOID ptr ); extern LPVOID HEAP_xalloc( HANDLE heap, DWORD flags, DWORD size ); -extern LPVOID HEAP_xrealloc( HANDLE heap, DWORD flags, LPVOID lpMem, DWORD size ); extern LPSTR HEAP_strdupA( HANDLE heap, DWORD flags, LPCSTR str ); extern LPWSTR HEAP_strdupW( HANDLE heap, DWORD flags, LPCWSTR str ); extern LPWSTR HEAP_strdupAtoW( HANDLE heap, DWORD flags, LPCSTR str ); diff --git a/memory/heap.c b/memory/heap.c index 058157259ce..2bd6e2c40a6 100644 --- a/memory/heap.c +++ b/memory/heap.c @@ -1651,24 +1651,6 @@ LPVOID HEAP_xalloc( HANDLE heap, DWORD flags, DWORD size ) } -/*********************************************************************** - * HEAP_xrealloc - * - * Same as HeapReAlloc(), but die on failure. - */ -LPVOID HEAP_xrealloc( HANDLE heap, DWORD flags, LPVOID lpMem, DWORD size ) -{ - LPVOID p = HeapReAlloc( heap, flags, lpMem, size ); - if (!p) - { - MESSAGE("Virtual memory exhausted.\n" ); - exit(1); - } - SET_EIP(p); - return p; -} - - /*********************************************************************** * HEAP_strdupA */