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

Function sdk_alloc_field_handle

src/api/InkAPI.cc:170–182  ·  view source on GitHub ↗

/ Allocators for field handles and standalone fields */ /

Source from the content-addressed store, hash-verified

168/* Allocators for field handles and standalone fields */
169/******************************************************/
170static MIMEFieldSDKHandle *
171sdk_alloc_field_handle(TSMBuffer /* bufp ATS_UNUSED */, MIMEHdrImpl *mh)
172{
173 MIMEFieldSDKHandle *handle = THREAD_ALLOC(mHandleAllocator, this_thread());
174
175 // TODO: Should remove this when memory allocation can't fail.
176 sdk_assert(sdk_sanity_check_null_ptr((void *)handle) == TS_SUCCESS);
177
178 obj_init_header(handle, HDR_HEAP_OBJ_FIELD_SDK_HANDLE, sizeof(MIMEFieldSDKHandle), 0);
179 handle->mh = mh;
180
181 return handle;
182}
183
184static void
185sdk_free_field_handle(TSMBuffer bufp, MIMEFieldSDKHandle *field_handle)

Callers 6

TSMimeHdrFieldGetFunction · 0.85
TSMimeHdrFieldFindFunction · 0.85
TSMimeHdrFieldCreateFunction · 0.85
TSMimeHdrFieldNextFunction · 0.85
TSMimeHdrFieldNextDupFunction · 0.85

Calls 3

this_threadFunction · 0.85
obj_init_headerFunction · 0.85

Tested by

no test coverage detected