We provide test cases for each task of this assignment.
Download the header file and the source file (last update: 14:00, Oct 12)
For each taskx() function, the testing will continue only if the previous test case is passed. If
You can use Dr. Memory or Valgrind to check memory leak. You need to disable compiler optimization (-O0).
$ X:\path\to\drmemory\bin64\drmemory.exe X:\path\to\your\executable.exe
* You can ignore "UNINITIALIZED READ: reading register eax" errors.
* Some of the leak problems cannot be detected if your compiler is VS.
* If you are using Windows, download
this and
put it at X:\path\to\drmemory\bin
$ valgrind --tool=memcheck --leak-check=full path/to/your/executable
* Valgrind doesn't support Windows.