MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / allocate

Method allocate

include/chaiscript/dispatchkit/short_alloc.hpp:124–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122 template <class _Up> struct rebind {using other = short_alloc<_Up, N, alignment>;};
123
124 T* allocate(std::size_t n)
125 {
126 return reinterpret_cast<T*>(a_.template allocate<alignof(T)>(n*sizeof(T)));
127 }
128 void deallocate(T* p, std::size_t n) noexcept
129 {
130 a_.deallocate(reinterpret_cast<char*>(p), n*sizeof(T));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected