Memory profiling errors
Error messages indicate invalid program behavior. These are serious issues that you should address before you check in code.
Freeing Freed Memory (FFM)
An FFM message indicates that the program is trying to free memory that has previously been freed.
This message can occur when one function frees the memory, but a data structure retains a pointer to that memory and later a different function tries to free the same memory. This message can also occur if the heap is corrupted.
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, which are specified in the memory profiling configuration settings. A large deferred free queue length and threshold increases the chances of catching FFM errors long after the block has been freed. 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.
Freeing Unallocated Memory (FUM)
- Memory on the stack
- Program code and data sections
Freeing Invalid Memory (FIM)
An FIM message indicates that the program is trying to free allocated memory with the wrong instruction.
This message can occur when the memory free instruction mismatches the memory allocation instruction. For example, a FIM occurs when memory is freed with a free instruction when it was allocated with a new instruction.
Late Detect Array Bounds Write (ABWL)
- An array is too small. For example, you fail to account for the terminating NULL in a string.
- You forgot to multiply by sizeof(type) when you allocate an array of objects.
- Code uses an array index that is too large or is negative.
- Fail to NULL terminate a string.
- Code is off by one when copying elements up or down an array.
Late Detect Free Memory Write (FMWL)
- There is 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 is far off the end of a valid block.
- A completely random pointer happens to fall within a freed block of memory.
Memory Allocation Failure (MAF)
An MAF message indicates that a memory allocation call failed. This message typically indicates that the program ran out of paging file space for a heap to grow. This message can also occur when a non-spreadable heap is saturated. After displaying the MAF message, a memory allocation call returns NULL in the normal manner. Ideally, programs should handle allocation failures.
Core Dump (COR)
A COR message indicates that the program generated a UNIX™ core dump. This message can only occur when the program is running on a UNIX™ target platform.