Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
13 Views

BVH's memory consumption is not adjusted at the end of the build

Hi,
I am using Embree under Windows and I have noticed that the displayedevaluation of the memory consumption of the BVH did not match its actual size in memory.
Digging a bit deeper, I have found that the implementation of the functionalignedRealloc() of platform.cpp did not do anything (it just returns the pointer).
So the BVH's memory footprint is not reduced at the end of the build as it is supposed to.
Why did you not use the win32 function _aligned_malloc() for its implementation. Is there something wrong with it or is it just an omission ?
Thanks.
0 Kudos
2 Replies
Highlighted
Moderator
13 Views

You are right, the _aligned_malloc, _aligned_realloc, _aligned_free functions, are the better choice. We will fix this in an update.
0 Kudos
Highlighted
Valued Contributor II
13 Views

>>...Why did you not use the win32 function _aligned_malloc() for its implementation...

Itis not a Win32 API function.

It is a CRT-function and, in case of a Visual Studio 20xx,it "unwraps" to _mm_malloc().

...
#define _mm_malloc(a, b) _aligned_malloc(a, b)
...

Note: CRT- C Run-Time
0 Kudos