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

Method deallocate

example/cpp11/allocation/server.cpp:64–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62 }
63
64 void deallocate(void* ptr)
65 {
66 auto* ucptr = static_cast<unsigned char*>(ptr);
67 if (std::less_equal<unsigned char*>{}(storage_, ucptr)
68 && std::less<unsigned char*>{}(ucptr, storage_ + preallocated_))
69 {
70 // Nothing to do.
71 }
72 else
73 {
74 ::operator delete(ptr);
75 }
76 }
77
78private:
79 std::size_t preallocated_;

Callers 2

deallocateMethod · 0.45
deallocateMethod · 0.45

Calls 1

operator deleteFunction · 0.85

Tested by

no test coverage detected