- Use malloc/free in C++ new/delete operator implementation (resolves heap issues with Mozilla Firefox).

svn path=/trunk/; revision=12009
This commit is contained in:
Filip Navara
2004-12-11 00:24:03 +00:00
parent da5463c04a
commit bc537c1d3e
+2 -2
View File
@@ -48,7 +48,7 @@ static int MSVCRT_new_mode;
*/
void* MSVCRT_operator_new(unsigned long size)
{
void *retval = HeapAlloc(GetProcessHeap(), 0, size);
void *retval = malloc(size);
TRACE("(%ld) returning %p\n", size, retval);
LOCK_HEAP;
if(!retval && MSVCRT_new_handler)
@@ -63,7 +63,7 @@ void* MSVCRT_operator_new(unsigned long size)
void MSVCRT_operator_delete(void *mem)
{
TRACE("(%p)\n", mem);
HeapFree(GetProcessHeap(), 0, mem);
free(mem);
}