From cfd9b5e6ee71766416a9945c274e0f4d581718c4 Mon Sep 17 00:00:00 2001 From: John Sully Date: Thu, 9 May 2019 19:05:09 -0400 Subject: [PATCH] Add missing file Former-commit-id: 7896ca6e52b9caa9d8ab78145f16872fe488c4bb --- src/new.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/new.h diff --git a/src/new.h b/src/new.h new file mode 100644 index 000000000..bb1a28af3 --- /dev/null +++ b/src/new.h @@ -0,0 +1,22 @@ +#pragma once + +[[deprecated]] +inline void *operator new(size_t size) +{ + return zmalloc(size, MALLOC_LOCAL); +} + +inline void *operator new(size_t size, enum MALLOC_CLASS mclass) +{ + return zmalloc(size, mclass); +} + +inline void operator delete(void * p) +{ + zfree(p); +} + +inline void operator delete(void *p, std::size_t) +{ + zfree(p); +} \ No newline at end of file