https://github.com/gdcmarinho/smart-malloc
Memory management library using Machine Learning
https://github.com/gdcmarinho/smart-malloc
ai alloc allocation arm c debug h iot library library-systems malloc memory memory-allocation memory-management ram research safety safety-monitoring security simple
Last synced: 11 months ago
JSON representation
Memory management library using Machine Learning
- Host: GitHub
- URL: https://github.com/gdcmarinho/smart-malloc
- Owner: gdcmarinho
- License: gpl-3.0
- Created: 2024-03-19T04:06:00.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-30T08:30:23.000Z (almost 2 years ago)
- Last Synced: 2024-12-07T18:34:22.901Z (about 1 year ago)
- Topics: ai, alloc, allocation, arm, c, debug, h, iot, library, library-systems, malloc, memory, memory-allocation, memory-management, ram, research, safety, safety-monitoring, security, simple
- Language: C
- Homepage:
- Size: 45.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
### 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](https://en.wikipedia.org/wiki/POSIX) 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:
```c
#include "smart_malloc.h"
```
and start using it:
```c
smart_malloc(strlen("Hello World!\n") * 10);
```
### Wiki
If you're lost, you'll probably like our [wiki](https://github.com/gdcmarinho/smart-malloc/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.