__cdecl #endif operator new(size_t size) { // void *p = ::HeapAlloc(::GetProcessHeap(), 0, size); void *p = ::malloc(size); if (p == 0) throw CNewException(); return p; }
void * __cdecl operator new(size_t size) { numAllocs++; void *p = HeapAlloc(GetProcessHeap(), 0, size); if (index < kDebugSize) { a[index] = p; index++; } if (p == 0) throw CNewException(); printf("Alloc %6d, size = %8d\n", numAllocs, size); return p; }