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

Method deallocate

kernels/common/vector.h:43–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41 }
42
43 __forceinline void deallocate( pointer p, size_type n )
44 {
45 if (p)
46 {
47 if (n*sizeof(value_type) >= 14 * PAGE_SIZE_2M)
48 os_free(p,n*sizeof(value_type),hugepages);
49 else
50 alignedFree(p);
51 }
52 else assert(n == 0);
53
54 if (n) {
55 assert(device);
56 device->memoryMonitor(-ssize_t(n)*sizeof(T),true);
57 }
58 }
59
60 __forceinline void construct( pointer p, const_reference val ) {
61 new (p) T(val);

Callers

nothing calls this directly

Calls 3

os_freeFunction · 0.85
alignedFreeFunction · 0.85
memoryMonitorMethod · 0.45

Tested by

no test coverage detected