Anonymous
Not applicable
Apr 03, 2014
07:37 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 03, 2014
07:37 PM
Hi,
I'm curious about this malloc_transfer_to_curr_thread because it's an empty define. All malloc is allocated from the global pool (in ThreadX) so i suppose from people who are using ThreadX there is no need for such transfer am i correct? But why is there such define and also used across some WICED App project if the implementation is empty??
Labels
- Labels:
-
SPI
1 Reply
Anonymous
Not applicable
Apr 07, 2014
10:33 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 07, 2014
10:33 PM
malloc_transfer_to_curr_thread() is only used when malloc debugging is enabled. This feature keeps track of which threads malloc memory and which threads free those pieces of memory. If a thread frees a piece of memory malloced by another thread without calling malloc_transfer_to_curr_thread() the malloc debug feature will assert allowing you to verify that the call to free() is valid.