MCPcopy Create free account
hub / github.com/boostorg/asio / allocate

Method allocate

test/experimental/coro/allocator.cpp:40–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38 tracked_allocator(const tracked_allocator<T>& a) : allocs(a.allocs), deallocs(a.deallocs) {}
39
40 value_type* allocate(std::size_t n)
41 {
42 auto p = new char[n * sizeof(Value)];
43 allocs.emplace_back(p, n);
44 return reinterpret_cast<value_type*>(p);
45 }
46
47 void deallocate(void* p, std::size_t n)
48 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected