- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What happens in to the memory in this scenario?
I have debugged in making sure that mallocThreadShutdownNotification is correctly being called ;)
- Memory allocated in thread 1 with scalable_malloc.
- Thread 1 terminated.
- Thread 2 started.
- Thread 2 calls scalable_free on data.
- Thread 2 allocates more memory using scalable_malloc.
I have debugged in making sure that mallocThreadShutdownNotification is correctly being called ;)
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If a thread was shut down nicely (and not just killed),the memory it had taken should be reused, though not necessarily immediately. Possibly the problem you see might be partially caused by different allocation sizes requested by the first and the second threads, as the TBB allocator separates memory pools (bins) for different sizes.
If you have a test case that exhibits the problem, I would appreciate if you submit it here.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page