I'm trying to complete a college assignment, and labeling criteria determine 5% for memory management - in particular, for the absence of memory leaks.
As I understand it, memory leaks in simple C programs are caused only by pointers that were left by the program - i.e. calls to malloc / calloc / etc, which never have a match free.
My question consists of 3 parts:
- The easiest way for Solaris and OSX to “prove” that you don't have a memory leak?
- Does Xcode have any tools to help identify Leak memory?
- Does the operating system work to free all previously allocated memory in program c after the process ends?
source
share