MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / operator new

Function operator new

source/core/StarMemory.cpp:111–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109
110
111void* operator new(std::size_t size) {
112 auto ptr = Star::malloc(size);
113 if (!ptr)
114 throw std::bad_alloc();
115 return ptr;
116}
117
118void* operator new[](std::size_t size) {
119 auto ptr = Star::malloc(size);

Callers

nothing calls this directly

Calls 1

mallocFunction · 0.70

Tested by

no test coverage detected