Memory Leak?

Memory Leak?

Visual Studio 2008, WinXP 32 bit, TBB 174oss, Boost 1.46.1.

In debug mode Boost test detects 260 bytes being leaked. It is always
260 bytes regardless of how many tasks were scheduled. After replacing
paralell_for with explicit task scheduling the same 260 bytes were
leaked. Probably not leak, but nevertheless...

#define BOOST_TEST_MODULE tbb_memory_leak_test
#include 

#ifdef _DEBUG
    #ifdef TBB_USE_DEBUG
        #undef TBB_USE_DEBUG
    #endif
    #define TBB_USE_DEBUG 1
#endif

#include 
#include 

struct MyTask
{
    void operator()(const tbb::blocked_range&) const { /*empty*/ }
};

BOOST_AUTO_TEST_CASE( free_test_function )
{
    tbb::parallel_for(tbb::blocked_range(0, 1000), MyTask());
    BOOST_CHECK(true);
}
2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

This is most likely a false positive. See e.g. a reply in one of the earlier threads discussing similar symptoms.

Leave a Comment

Please sign in to add a comment. Not a member? Join today