MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / isAllocatedPtr

Method isAllocatedPtr

include/daScript/misc/memory_model.h:221–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219 return false;
220 }
221 bool isAllocatedPtr ( char * ptr, uint32_t size ) const {
222 DAS_ASSERT(size && size<=DAS_MAX_SHOE_ALLOCATION);
223 if ( lastChunk && lastChunk->isOwnPtr(ptr) ) {
224 return lastChunk->isAllocatedPtr(ptr);
225 }
226 uint32_t si = (size >> 4) - 1;
227 for ( auto ch = chunks[si]; ch; ch=ch->next ) {
228 if ( ch != lastChunk && ch->isOwnPtr(ptr) ) {
229 lastChunk = ch;
230 return ch->isAllocatedPtr(ptr);
231 }
232 }
233 return false;
234 }
235 void getStats ( uint32_t & depth, uint32_t & pages, uint64_t & bytes, uint64_t & totalBytes ) const {
236 depth = 0;
237 bytes = 0;

Callers

nothing calls this directly

Calls 2

isOwnPtrMethod · 0.45
isAllocatedPtrMethod · 0.45

Tested by

no test coverage detected