MCPcopy Create free account
hub / github.com/RenderKit/embree / alloc

Function alloc

kernels/subdiv/tessellation_cache.h:275–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273 const unsigned int users);
274
275 __forceinline size_t alloc(const size_t blocks)
276 {
277 if (unlikely(blocks >= switch_block_threshold))
278 throw_RTCError(RTC_ERROR_INVALID_OPERATION,"allocation exceeds size of tessellation cache segment");
279
280 assert(blocks < switch_block_threshold);
281 size_t index = next_block.fetch_add(blocks);
282 if (unlikely(index + blocks >= switch_block_threshold)) return (size_t)-1;
283 return index;
284 }
285
286 static __forceinline void* malloc(const size_t bytes)
287 {

Callers 11

createMethod · 0.85
createMethod · 0.85
createMethod · 0.85
createMethod · 0.85
createMethod · 0.85
createMethod · 0.85
createMethod · 0.85
createMethod · 0.85
BufferMethod · 0.85
FastAllocatorClass · 0.85
push_rightMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected