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

Method allocate

example/cpp11/allocation/server.cpp:145–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143 handler_memory& operator=(const handler_memory&) = delete;
144
145 void* allocate(std::size_t size)
146 {
147 if (!in_use_ && size < sizeof(storage_))
148 {
149 in_use_ = true;
150 return &storage_;
151 }
152 else
153 {
154 return ::operator new(size);
155 }
156 }
157
158 void deallocate(void* pointer)
159 {

Callers

nothing calls this directly

Calls 1

operator newFunction · 0.50

Tested by

no test coverage detected