Override missing new, fix new/delete mismatch
Former-commit-id: 712d825c233c3ebbc49b22b8c1865916ca9dc3bc
This commit is contained in:
parent
fe8acd0b30
commit
903aeda836
@ -1,6 +1,7 @@
|
||||
#include <cstddef> // std::size_t
|
||||
#include "server.h"
|
||||
#include "new.h"
|
||||
#include <new>
|
||||
|
||||
#ifdef SANITIZE
|
||||
void *operator new(size_t size, enum MALLOC_CLASS mclass)
|
||||
@ -21,6 +22,11 @@ void *operator new(size_t size, enum MALLOC_CLASS mclass)
|
||||
return zmalloc(size, mclass);
|
||||
}
|
||||
|
||||
void *operator new(std::size_t size, const std::nothrow_t &)
|
||||
{
|
||||
return zmalloc(size, MALLOC_LOCAL);
|
||||
}
|
||||
|
||||
void operator delete(void * p) noexcept
|
||||
{
|
||||
zfree(p);
|
||||
|
Loading…
x
Reference in New Issue
Block a user