Calculator/newdel.cpp
2023-11-26 15:56:00 +01:00

23 lines
339 B
C++

#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);
}