| 141 | } |
| 142 | |
| 143 | void Free(void *p, SQUnsignedInteger size) |
| 144 | { |
| 145 | if (p == nullptr) return; |
| 146 | this->allocator.deallocate(reinterpret_cast<uint8_t*>(p), size); |
| 147 | this->allocated_size -= size; |
| 148 | |
| 149 | #ifdef SCRIPT_DEBUG_ALLOCATIONS |
| 150 | assert(this->allocations.at(p) == size); |
| 151 | this->allocations.erase(p); |
| 152 | #endif |
| 153 | } |
| 154 | |
| 155 | ScriptAllocator() |
| 156 | { |
no test coverage detected