I havea problem with allocating large arrays using new.
int* p = new int; // 8128 bytes
works, but this,
int* p = new int; // 8128+4 bytes
does not. It throws a bad_alloc exception.
I read this in another thread at this forum:
"8K is the approximate size limit for requests that scalable_allocator serves from its own structures; for bigger requests, it refers to malloc"
So the problem seems related to when scalable_malloc uses malloc.
I'm using the pre-compiled binaries for VC++ 2008 in the tbb20_017oss download. I'm using theExpress edition.
I've replaced the new and delete functions according tothe Memory Allocation section in theTBB book and I've put traces in them so I know they're being called.
Another less severe problem is that the linker complains that the new/delete functions are already defined. Thisdoesn't seem to prevent it though from linking in the replacements.
There are also a few level 4 warnings in tbb ask.h.