Late Detect Free Memory Write (FMWL)

Memory Profiling for C and C++

An FMWL message indicates that the program wrote to memory that was freed.

This message can occur when you:

  • Have a dangling pointer to a block of memory that has already been freed (caused by retaining the pointer too long or freeing the memory too soon)

  • Index far off the end of a valid block

  • Use a completely random pointer which happens to fall within a freed block of memory

Memory Profiling maintains a free queue, whose role is to actually delay memory free calls in order to compare with upcoming free calls. The length of the delay depends on the Free queue length and Free queue threshold Memory Profiling Settings. A large deferred free queue length and threshold increases the chances of catching FMWL errors. A smaller deferred free queue length and threshold limits the amount of memory on the deferred free queue, taking up less memory at run time but providing a lower level of error detection.

Related Topics

Error Messages | Memory Profiling Results | Memory Profiling Settings