Community
cancel
Showing results for 
Search instead for 
Did you mean: 
martinus
Beginner
45 Views

tbbmalloc_proxy problems with OpenNI

Hi all,

I have got a strange problem: We are using tbbmalloc_proxy (just#include ), and it sped up our application quite a lot (20% on most CPUs, 8 times on a dual Xeon).
We are using Microsoft's Kinect in our application, and when enabling tbbmalloc we cannot open a connection to the kinect. Everything works fine when disabling tbbmalloc.
More detailed, we use OpenCV which usesOpenNI to open a connection to the Kinect. The commandRunXmlScriptFromFilereturns a status 0 (=OK) without tbbmalloc, and not 0 with tbbmalloc.
Any ideas how to get this working with tbbmalloc?
We are using tbb 3.0.3
Martin
0 Kudos
2 Replies
Kirill_R_Intel
Employee
45 Views

Martin,

Is it possible to try TBB 3.0 update 8 with your application? It may operate better. Also, is it possible to get a small reproducer of the problem, or it is specific to your application and platform?

Regards,
Kirill

Alexey_K_Intel3
Employee
45 Views

Dynamic replacement of standard memory allocation routines with tbbmalloc is done via run-time modification of MSVCRTimage in the application address space, and it has global effect. For complex applications using 3rd party components, especially those from Microsoft that may e.g. use internal MSVCRT implementation details, it can cause problems. To understand what's going wrong, we would need a reproducing test.
As a workaround, I may suggest you to analyze what modules of your app benefit most from the TBB allocator, and in these modules directly use the TBB allocator functions (scalable_malloc etc) instead of the standard routines. Admittedly, it is much more to do comparing to use of tbbmalloc_proxy, but might be worth it.
Reply