Skip to content

bo1led-owl/spalloc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spalloc

Toy allocator written in Zig, inspired by Sys.Pro C programming language course task.

Features

  • No chunk headers
  • Using additional memory only when chunks get allocated
  • Special treatment of different types of chunks for better performance

Usage

spalloc.h provides spmalloc, spcalloc, sprealloc and spfree functions. These functions have the same API as the standard C malloc, calloc, realloc and free.

Building

Just use zig build with standard optimization options. By default it builds a static library. To build the shared version, pass -Dshared option.

About

Toy allocator with C interface written in Zig

Topics

Resources

License

Stars

Watchers

Forks