| 71 | return (ptr>=data) && (ptr<data+totalBytes); |
| 72 | } |
| 73 | __forceinline bool isAllocatedPtr ( char * ptr ) { |
| 74 | ptrdiff_t idx = (ptr - data) / size; |
| 75 | DAS_ASSERT ( idx>=0 && idx<ptrdiff_t(total) ); |
| 76 | uint64_t uidx = uint64_t(idx); |
| 77 | uint64_t i = uidx >> 5; |
| 78 | uint32_t j = uint32_t(uidx & 31); |
| 79 | uint32_t b = bits[i]; |
| 80 | return ((b & (1u<<j))!=0); |
| 81 | } |
| 82 | __forceinline char * allocate ( ) { |
| 83 | if ( allocated == total ) return nullptr; |
| 84 | uint64_t maxt = total / 32; |
no outgoing calls
no test coverage detected