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

Method alloc_void

include/tscore/Allocator.h:135–148  ·  view source on GitHub ↗

Allocate a block of memory (size specified during construction of Allocator. */

Source from the content-addressed store, hash-verified

133 of Allocator.
134 */
135 void *
136 alloc_void()
137 {
138 void *ptr = nullptr;
139 if (alignment) {
140 ptr = aligned_alloc(alignment, element_size);
141 } else {
142 ptr = malloc(element_size);
143 }
144 if (advice) {
145 madvise(ptr, element_size, advice);
146 }
147 return ptr;
148 }
149
150 /**
151 Deallocate a block of memory allocated by the Allocator.

Callers 8

allocMethod · 0.45
thread_allocFunction · 0.45
allocMethod · 0.45
unmarshallMethod · 0.45
LogBufferMethod · 0.45
blk_allocFunction · 0.45
allocMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected