| 219 | return hc; |
| 220 | } |
| 221 | forceinline void |
| 222 | SharedMemory::free(HeapChunk* hc) { |
| 223 | Support::Lock guard(m()); |
| 224 | if (heap.n_hc == MemoryConfig::n_hc_cache) { |
| 225 | Gecode::heap.rfree(hc); |
| 226 | } else { |
| 227 | heap.n_hc++; |
| 228 | hc->next = heap.hc; heap.hc = hc; |
| 229 | } |
| 230 | } |
| 231 | |
| 232 | |
| 233 | }} |