Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ensimalloc

Dynamic memory allocator written in C.

This project implements a simplified malloc/free-style allocator with three allocation classes:

  • small allocations served from a fixed-size chunk pool;
  • medium allocations managed with a buddy allocator;
  • large allocations mapped directly with mmap.

Each allocated block is marked with metadata before and after the user area. This metadata stores the allocation size and kind, and includes a magic value derived from the block address to detect memory overwrites during free.

Features

  • Block marking and validation.
  • Small allocation pool with recursive-doubling refill.
  • Medium-size buddy allocator with block splitting and coalescing.
  • Large allocations through direct mmap / munmap.
  • Unit tests with GoogleTest.
  • Interactive memshell executable for manual allocator inspection.

Build

mkdir -p build
cd build
cmake ..
make

Run Tests

From the build directory:

ctest --output-on-failure
make check

Expected result:

12 tests passed

Project Layout

src/      allocator implementation and memshell
tests/    GoogleTest unit tests
AUTHORS   project authors
LICENSE   license

Notes

The allocator is designed for educational purposes. It follows the assignment structure from the Ensimag systems course and focuses on allocator internals: metadata, free lists, buddy splitting, and coalescing.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages