forked from mirrors/gecko-dev
Bug 547454 orkinHeap should use malloc/free instead of new/delete
r=neil
This commit is contained in:
parent
6a63bb9e94
commit
bf3ac3f922
1 changed files with 4 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue