17-simple-memory-management/README.md
2025-03-08 13:36:49 +01:00

2.1 KiB
Raw Permalink Blame History

Review Assignment Due Date

if.03.22 Procedural Programming

Assignment Simple Memory Manager

With this assignment you shall implement a simple memory manager in C.

Assignment Objective

Implementation of a memory management system as a replacement for malloc and free.

Assignment

Technical details regarding the implementation of the memory manager are stated in file mem_man.c.

  • Implement all functions declared in mem_man.h.
  • Implement unit tests, at least those that are declared in test_mem_man.h
  • Add additional unit tests as needed.

Working Instructions

  1. Implement all missing but required functions of all files mentioned below empty to make the application compilable and runnable. Most unit tests will be red.
    --COMMIT--
  2. 'test_mem_man.c': Implement all declared unit tests. Run those tests, they shall be red, because non of the tested functions is implemented yet.
    --COMMIT--
  3. 'mem_man.c': Implement all functions defined by this file.
  • Obey comments in header files and source code.
  • Run the unit tests frequently and fix failures.
  • Make all unit tests green.
    --COMMIT--
  1. 'test_mem_man.c': Extend the unit tests with additional test cases.
    --COMMIT--
  2. 'mem_man_app.c': Implement the main application according to the requirements state in the source file of the application.
    --COMMIT--
  3. Run and stabilize the application.

Notes

  • general.h contains macros for finding the minimum, maximum, and absolute value
  • make clean test: This new make target for clearing the console, building, and running unit test is available.
  • Sometimes changes are not properly detected by incremental builds. If something very strange happens during compilation, try to run make clean followed by make to start a clean build. This approach is also recommended after everything is done, because some compiler warning appears only in clean builds.