1 Reply Latest reply on Apr 7, 2014 10:33 PM by nikvh

    About malloc_transfer_to_curr_thread

      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??

        • 1. Re: About malloc_transfer_to_curr_thread

          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.

          1 of 1 people found this helpful