* Wrappers for raw allocation routines * */
| 354 | * |
| 355 | */ |
| 356 | forceinline void* |
| 357 | Heap::ralloc(size_t s) { |
| 358 | void* p = Support::allocator.alloc(s); |
| 359 | #ifdef GECODE_PEAKHEAP |
| 360 | _m.acquire(); |
| 361 | _cur += GECODE_MSIZE(p); |
| 362 | _peak = std::max(_peak,_cur); |
| 363 | _m.release(); |
| 364 | #endif |
| 365 | if (p != nullptr) |
| 366 | return p; |
| 367 | throw MemoryExhausted(); |
| 368 | } |
| 369 | |
| 370 | forceinline void |
| 371 | Heap::rfree(void* p) { |
no test coverage detected