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

Method initFields

include/tscore/Extendible.h:608–618  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

606/// tell this extendible where it's memory offset start is. Added to support inheriting from extendible classes
607template <class Derived_t>
608uintptr_t
609Extendible<Derived_t>::initFields(uintptr_t start_ptr)
610{
611 ink_assert(ext_loc == 0);
612 start_ptr = ROUNDUP(start_ptr, schema.alloc_align); // pad the previous struct, so that our fields are memaligned correctly
613 ink_assert(start_ptr - uintptr_t(this) < UINT16_MAX);
614 ext_loc = static_cast<uint16_t>(start_ptr - uintptr_t(this)); // store the offset to be used by ext::get and ext::set
615 ink_assert(ext_loc > 0);
616 schema.callConstructor(start_ptr); // construct all fields
617 return start_ptr + schema.alloc_size; // return the end of the extendible data
618}
619
620namespace details
621{

Callers

nothing calls this directly

Calls 2

ROUNDUPFunction · 0.85
callConstructorMethod · 0.80

Tested by

no test coverage detected