File: gmempp.cpp

package info (click to toggle)
pdftoipe 20040630-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,552 kB
  • ctags: 3,413
  • sloc: cpp: 36,882; ansic: 2,877; makefile: 37
file content (32 lines) | stat: -rw-r--r-- 560 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//========================================================================
//
// gmempp.cc
//
// Use gmalloc/gfree for C++ new/delete operators.
//
// Copyright 1996-2002 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