- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are right, the _aligned_malloc, _aligned_realloc, _aligned_free functions, are the better choice. We will fix this in an update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>...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
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
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page