- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just ran into a case where calling scalable_malloc(56) via tbbmalloc_proxy on Visual Studio 2015 (Windows 64-bit) returned a pointer that was NOT 16-byte aligned. Because the calling code (the matrix library Eigen) assumed that malloc() was 16-byte aligned on _WIN64, it proceeded to try using an optimized SSE copy routine that just crashed.
From reading the Visual Studio documentation at https://msdn.microsoft.com/en-us/library/ycsb6wwf.aspx , it seems that for 64-bit platforms it's saying that malloc() is guaranteed to be 16-byte aligned. So this seems to be a tbbmalloc_proxy bug?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's rather tbbmalloc compatibility issue, as tbbmalloc_proxy simply redirects the memory allocation routines to tbbmalloc.
Thanks for reporting the bug; we will fix it. The workaround is to request 64 bytes instead, if possible.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's rather tbbmalloc compatibility issue, as tbbmalloc_proxy simply redirects the memory allocation routines to tbbmalloc.
Thanks for reporting the bug; we will fix it. The workaround is to request 64 bytes instead, if possible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, Alexey!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I should note that glibc also has similar behaviour:
https://www.gnu.org/software/libc/manual/html_node/Aligned-Memory-Blocks.html

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page