Calculator/newdel.cpp

24 lines
339 B
C++
Raw Permalink Normal View History

2023-11-26 15:56:00 +01:00
#include <stdlib.h>
void* operator new (unsigned long size) {
return calloc(1,size);
}
void operator delete (void* p) {
free (p);
}
void* operator new[] (unsigned long size) {
return calloc(1,size);
}
void operator delete[] (void* p) {
free (p);
}
void operator delete (void* p, unsigned size) {
(void) size;
free (p);
}