- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm performing an analysis of my application with Rational Purify. As this application uses TBB, I have, somewhere in my code:
[cpp]void SomeClass::someMethod([...])
{
// Init TBB
tbb::task_scheduler_init tbbInit;
[...]
}[/cpp]
Purify raises the following error:
FMM: Freeing mismatched memory in !>(void *) {1 occurrence}
Address 0x0bc14f28 points into a malloc'd block in heap 0x0bc10000
Location of free attempt
!>(void *)
tbb::task_scheduler_init::~task_scheduler_init(void) [task_scheduler_init.h:81]
SomeClass::someMethod([...])
Allocation location
malloc
tbb::task_scheduler_init::task_scheduler_init(int) [task_scheduler_init.h:75]
SomeClass::someMethod([...])
Quoting the documentation :
An FMM message indicates that your program is deallocating memory using a function from a different family than the one used to allocate the memory.
An FMM error can occur when you use new[] to allocate memory and delete to free the memory. You should use delete[] instead, otherwise the destructor associated with the memory cannot be run. Purify reports an FMM message when your program allocates memory from one family of APIs and then deallocates the memory from a mismatching family. Purify checks these families:
new/delete
new[]/delete[]
malloc/free
calloc/free
realloc/free
XtMalloc/XtFree
Is this Purify getting confused and raising a false positive ? Everything seems to be working fine.
I'm using TBB 2.0_020.
Thanks for your help,
Stphane
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page