Bug 547454 orkinHeap should use malloc/free instead of new/delete

r=neil
This commit is contained in:
timeless@mozdev.org 2010-02-28 22:59:55 +02:00
parent 6a63bb9e94
commit bf3ac3f922

View file

@ -51,6 +51,8 @@
#include "morkEnv.h"
#endif
#include <stdlib.h>
//3456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789
@ -87,7 +89,7 @@ orkinHeap::Alloc(nsIMdbEnv* mev, // allocate a piece of memory
MORK_USED_1(mev);
mdb_err outErr = 0;
void* block = ::operator new(inSize);
void* block = malloc(inSize);
if ( !block )
outErr = morkEnv_kOutOfMemoryError;
#ifdef MORK_DEBUG_HEAP_STATS
@ -163,7 +165,7 @@ orkinHeap::Free(nsIMdbEnv* mev, // free block allocated earlier by Alloc()
}
#endif /*MORK_DEBUG_HEAP_STATS*/
::operator delete(inBlock);
free(inBlock);
}
return 0;
}