MCPcopy Create free account
hub / github.com/Gecode/gecode / alloc

Method alloc

gecode/kernel/memory/region.hpp:333–343  ·  view source on GitHub ↗

* Implementation * */

Source from the content-addressed store, hash-verified

331 *
332 */
333 forceinline bool
334 Region::Chunk::alloc(size_t s, void*& p) {
335 Kernel::MemoryConfig::align
336 (s,((alignof(std::max_align_t) > GECODE_MEMORY_ALIGNMENT) ?
337 alignof(std::max_align_t) : GECODE_MEMORY_ALIGNMENT));
338 if (s > free)
339 return false;
340 free -= s;
341 p = ptr_cast<char*>(&area[0]) + free;
342 return true;
343 }
344
345 forceinline void
346 Region::Chunk::reset(void) {

Callers 1

rallocMethod · 0.45

Calls 1

alignFunction · 0.85

Tested by

no test coverage detected