MCPcopy Create free account
hub / github.com/SmingHub/Sming / offsetPointer

Function offsetPointer

Sming/Components/malloc_count/malloc_count.cpp:88–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86
87/* Add an offset to a pointer return that as a pointer cast to required type */
88template <typename T = void*> T offsetPointer(void* ptr, intptr_t offset)
89{
90 return reinterpret_cast<T>(reinterpret_cast<intptr_t>(ptr) + offset);
91}
92
93/* Get pointer to sentinel */
94size_t* getSentinel(void* ptr)

Callers 3

mc_mallocFunction · 0.85
mc_freeFunction · 0.85
mc_reallocFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected