An open API service indexing awesome lists of open source software.

https://github.com/spitulax/memplus

A library to help with memory allocation in C
https://github.com/spitulax/memplus

c

Last synced: about 1 month ago
JSON representation

A library to help with memory allocation in C

Awesome Lists containing this project

README

          

Memplus


A library to help with memory allocation and other useful things in C.

> [!CAUTION]
> This library is still in development! Use at your own risk.

## Features

- [x] Allocator interface
- [x] Arena allocators (growing, static, temp)
- [x] Heap allocator
- [x] Dynamic array
- [x] Sized string
- [x] String builder
- [x] UTF-8 string support
- [x] Hash table
- [x] Hash set
- [x] File IO
- [ ] Logging
- [ ] Tracking allocator
- [ ] Testing
- [ ] Subprocess
- [ ] Other kinds of allocators
- [ ] Socket IO
- [ ] Threading

## Usage

Memplus is a header only library that you can copy to your project and modify as
you like.

```c
#define MEMPLUS_IMPLEMENTATION // add this line once in a C file
#include "memplus.h"
```

## Support

Theoretically supports POSIX systems and Windows. Tested on Linux with GCC and
Clang, and on Windows with MSVC.