MCPcopy Create free account
hub / github.com/baidu/babylon / do_allocate

Method do_allocate

test/reusable/test_memory_resource.cpp:27–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25
26struct MockResource : public ::std::pmr::memory_resource {
27 virtual void* do_allocate(size_t bytes, size_t alignment) noexcept override {
28 allocate_called = true;
29 return ::operator new(bytes, ::std::align_val_t(alignment));
30 }
31
32 virtual void do_deallocate(void* ptr, size_t bytes,
33 size_t alignment) noexcept override {

Callers

nothing calls this directly

Calls 2

operator newFunction · 0.85
align_val_tEnum · 0.85

Tested by

no test coverage detected