Found some bugs in the Visual Studio tbbmalloc_proxy implementation. These bugs should also exist for VS2008 (or later), but I've only tested this in VS2012.
- _aligned_msize() is not hooked. When this is called, the standard “_aligned_mize” is triggered, causing a crash since the block has been allocated by tbb and not by the standard allocator.
- _aligned_malloc() is hooked but a 0-alignment causes NULL to be returned, contrary to the (bad) CRT behaviour. The CRT behaviour is to accept 0 but silently use sizeof(void*)-alignment. While I agree with the behaviour of scalable_aligned_malloc(), the hooked version should probably emulate CRT bugs.