mirror of
https://github.com/MaJerle/lwmem.git
synced 2025-01-26 06:02:54 +08:00
upbeat27
2a81abf0f4
Optimize checking for default instance
LWMEM_GET_LW is used almost everywhere, when it really only needs to reassign the instance once in each higher level function. After the reassignment, the correct instance will be used in all subsequent lower level functions.
Lightweight dynamic memory manager
Read first: Documentation
Features
- Written in ANSI C99, compatible with
size_t
for size data types - Implements standard C library functions for memory allocation, malloc, calloc, realloc and free
- Uses first-fit algorithm to search for free block
- Supports multiple allocation instances to split between memories and/or CPU cores
- Supports different memory regions to allow use of fragmented memories
- Highly configurable for memory allocation and reallocation
- Supports embedded applications with fragmented memories
- Supports automotive applications
- Supports advanced free/realloc algorithms to optimize memory usage
- Operating system ready, thread-safe API
- C++ wrapper functions
- User friendly MIT license
Contribute
Fresh contributions are always welcome. Simple instructions to proceed::
- Fork Github repository
- Respect C style & coding rules used by the library
- Create a pull request to develop branch with new features or bug fixes
Alternatively you may:
- Report a bug
- Ask for a feature request
Languages
C
90.3%
C++
5.9%
CMake
3.8%