MCPcopy Create free account
hub / github.com/EricPengShuai/Interview / operator new

Method operator new

base_code/virtual_base.cpp:29–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27 }
28
29 void* operator new(size_t size) {
30 void *p = malloc(size);
31 cout << "operator new p: " << p << endl;
32 return p;
33 }
34
35 void operator delete(void *ptr) {
36 cout << "B::opeartor delete p: " << ptr << endl;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected