MCPcopy Create free account
hub / github.com/OpenPathGuidingLibrary/openpgl / alignedMalloc

Function alignedMalloc

third-party/embreeSrc/common/sys/alloc.cpp:14–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12namespace embree
13{
14 void* alignedMalloc(size_t size, size_t align)
15 {
16 if (size == 0)
17 return nullptr;
18
19 assert((align & (align-1)) == 0);
20 void* ptr = _mm_malloc(size,align);
21
22 if (size != 0 && ptr == nullptr)
23 throw std::bad_alloc();
24
25 return ptr;
26 }
27
28 void alignedFree(void* ptr)
29 {

Callers 3

StackArrayFunction · 0.70
allocateMethod · 0.70
tbbRadixSortMethod · 0.50

Calls 1

_mm_mallocFunction · 0.85

Tested by

no test coverage detected