summaryrefslogtreecommitdiffstats
path: root/kpdf/xpdf/goo/gmempp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kpdf/xpdf/goo/gmempp.cc')
-rw-r--r--kpdf/xpdf/goo/gmempp.cc32
1 files changed, 32 insertions, 0 deletions
diff --git a/kpdf/xpdf/goo/gmempp.cc b/kpdf/xpdf/goo/gmempp.cc
new file mode 100644
index 00000000..b1ee970d
--- /dev/null
+++ b/kpdf/xpdf/goo/gmempp.cc
@@ -0,0 +1,32 @@
+//========================================================================
+//
+// gmempp.cc
+//
+// Use gmalloc/gfree for C++ new/delete operators.
+//
+// Copyright 1996-2003 Glyph & Cog, LLC
+//
+//========================================================================
+
+#include <aconf.h>
+#include "gmem.h"
+
+#ifdef DEBUG_MEM
+
+void *operator new(size_t size) {
+ return gmalloc((int)size);
+}
+
+void *operator new[](size_t size) {
+ return gmalloc((int)size);
+}
+
+void operator delete(void *p) {
+ gfree(p);
+}
+
+void operator delete[](void *p) {
+ gfree(p);
+}
+
+#endif