完善内存统计

This commit is contained in:
ziyue 2021-06-08 17:48:52 +08:00
parent 9c3ec4b4ed
commit 6ccf512367

View File

@ -405,6 +405,10 @@ void operator delete(void *ptr) {
free(ptr);
}
void operator delete(void *ptr, std::size_t) {
free(ptr);
}
void *operator new[](std::size_t size) {
auto ret = malloc(size);
if (ret) {
@ -416,4 +420,8 @@ void *operator new[](std::size_t size) {
void operator delete[](void *ptr) {
free(ptr);
}
void operator delete[](void *ptr, std::size_t) {
free(ptr);
}
#endif