MCPcopy Create free account
hub / github.com/apache/trafficserver / alloc

Method alloc

include/tscore/Allocator.h:340–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338 /** Allocates objects of the templated type. Arguments are forwarded to the constructor for the object. */
339 template <typename... Args>
340 C *
341 alloc(Args &&...args)
342 {
343 void *ptr = this->alloc_void();
344
345 ::new (ptr) C(std::forward<Args>(args)...);
346 return reinterpret_cast<C *>(ptr);
347 }
348
349 /**
350 Deallocates objects of the templated type.

Callers

nothing calls this directly

Calls 1

alloc_voidMethod · 0.45

Tested by

no test coverage detected