Skip to content

xyderos/arena_allocators

Repository files navigation

Allocators

This project attempts to implement some small allocators designed with simplicity in mind.

The project utilizes a naive approach on the internal memory handling and expands on the on-top data structures.

Features

  • Error handling is implemented via a custom jump handler that is implemented with the ucontext library.

    • Keep in mind that the error handler is compiler specific, meaning that it is supported on all architectures and the compiler supports the GNU C Extensions
  • Concurrency is supported, all the on-top allocators are implemented with semaphores in order to ensure that there are no data races.

Current allocators implemented

  • A hash trie that utilizes an internal arena
    • Supports fast inserting and lazy deletion
    • Reduced fragmentation
    • Memory locality
    • Scalability
  • A probing map thata utilizes open addressing with linear probing
    • Inherits the same characteristics as the trie allocator
    • There is a bug on the semaphore that locks upon insert and causes a segfault, needs to be investigated

Keep in mind that this is not a production library and it far away from becoming one yet

Bugs

  • The probing map works the majority of times but quite rarely the semaphore causes a seg fault, needs to be investigated
  • Possible bug with stack allocation on pthread_create, needs investigation

Feel free to contribute!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published