LwMEM is a lightweight dynamic memory manager optimized for embedded systems.
- Written in C (C11), compatible with
stdint.hdata 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, ideal for use with fragmented or embedded memories
- Highly configurable for memory allocation and reallocation
- Supports automotive applications
- Supports advanced free/realloc algorithms to optimize memory usage
- Supports light implementation with allocation only
- Optional runtime allocation statistics: used/free/minimum-ever-free bytes and alloc/free counts
- Safe free and realloc variants that null the caller's pointer after the operation
- Optional memory wipe on free/realloc for security-sensitive applications
- Query the usable size of an allocated block at runtime
- Operating system ready, thread-safe API, with ready-made ports for CMSIS-OS, pthreads, ThreadX and Win32
- C++ wrapper functions
- User friendly MIT license
Fresh contributions are always welcome. Simple instructions to proceed:
- Fork Github repository
- Follow C style & coding rules and use
clang-formatto format the code - Create a pull request to
developbranch with new features or bug fixes
Alternatively you may:
- Report a bug
- Ask for a feature request