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

Method isOwnPtr

include/daScript/misc/memory_model.h:207–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205 }
206 }
207 bool isOwnPtr ( char * ptr, uint32_t size ) const {
208 DAS_ASSERT(size && size<=DAS_MAX_SHOE_ALLOCATION);
209 if ( lastChunk && lastChunk->isOwnPtr(ptr) ) {
210 return true;
211 }
212 uint32_t si = (size >> 4) - 1;
213 for ( auto ch = chunks[si]; ch; ch=ch->next ) {
214 if ( ch != lastChunk && ch->isOwnPtr(ptr) ) {
215 lastChunk = ch;
216 return true;
217 }
218 }
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) ) {

Callers

nothing calls this directly

Calls 1

isOwnPtrMethod · 0.45

Tested by

no test coverage detected