MCPcopy Create free account
hub / github.com/apache/arrow / operator new

Method operator new

cpp/src/arrow/c/bridge.cc:87–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85template <typename Derived>
86struct PoolAllocationMixin {
87 static void* operator new(size_t size) {
88 DCHECK_EQ(size, sizeof(Derived));
89 uint8_t* data;
90 ARROW_CHECK_OK(default_memory_pool()->Allocate(static_cast<int64_t>(size), &data));
91 return data;
92 }
93
94 static void operator delete(void* ptr) {
95 default_memory_pool()->Free(reinterpret_cast<uint8_t*>(ptr), sizeof(Derived));

Callers

nothing calls this directly

Calls 2

default_memory_poolFunction · 0.85
AllocateMethod · 0.45

Tested by

no test coverage detected