gdcmarinho / smart-malloc

Memory management library using Machine Learning
GNU General Public License v3.0
0 stars 0 forks source link
ai alloc allocation arm c debug h iot library library-systems malloc memory memory-allocation memory-management ram research safety safety-monitoring security simple

Introduction

smart-malloc is a memory management library that uses overengineered and overheaded machine learning system to determine if it's a good idea to allocate or not a new memory block. It uses the sbrk() POSIX interface to allocate new memory.

Use Cases

As already mentioned, smart-malloc has no intention to be a memory management library for all purposes. It has a really overengineered and overheaded machine learning system that works to detect and decide when it's time to free some memory block and if it's acceptable to allocate a new memory block.

The main point of smart-malloc is for reasearch and debugging, so, the use in production scenarios should be avoided.

Usage

Clone the repository and copy the smart_malloc.c and smart_malloc.h inside your project. Import the headers file:

#include "smart_malloc.h"

and start using it:

smart_malloc(strlen("Hello World!\n") * 10);

Wiki

If you're lost, you'll probably like our wiki with a really detailed explanation about smart-malloc and memory management.

License

smart-malloc is open source and uses GPLv3. See the LICENSE file for more info.

GPLv3 license badge