MCPcopy Create free account
hub / github.com/WheretIB/nullc / IsBasePointer

Method IsBasePointer

NULLC/translation/runtime.cpp:1382–1406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1380}
1381
1382bool NULLC::IsBasePointer(void* ptr)
1383{
1384 // Search in range of every pool
1385 if(pool8.IsBasePointer(ptr))
1386 return true;
1387 if(pool16.IsBasePointer(ptr))
1388 return true;
1389 if(pool32.IsBasePointer(ptr))
1390 return true;
1391 if(pool64.IsBasePointer(ptr))
1392 return true;
1393 if(pool128.IsBasePointer(ptr))
1394 return true;
1395 if(pool256.IsBasePointer(ptr))
1396 return true;
1397 if(pool512.IsBasePointer(ptr))
1398 return true;
1399 // Search in global pool
1400 for(unsigned int i = 0; i < globalObjects.size(); i++)
1401 {
1402 if((char*)ptr - 8 == globalObjects[i])
1403 return true;
1404 }
1405 return false;
1406}
1407
1408void* NULLC::GetBasePointer(void* ptr)
1409{

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected