Coder Social home page Coder Social logo

gdcmarinho / smart-malloc Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 47 KB

Memory management library using Machine Learning

License: GNU General Public License v3.0

C 76.14% Makefile 23.86%
alloc allocation arm c h iot library library-systems malloc memory memory-allocation memory-management ram safety safety-monitoring security simple ai debug research

smart-malloc's Introduction

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

smart-malloc's People

Contributors

gdcmarinho avatar

Watchers

 avatar  avatar

smart-malloc's Issues

Add a statistical analysis module for memory block allocation and deallocation

To generate insights into when smart memory would be useful, we can consider some hypothetical scenarios:

1. Applications with Complex Memory Usage Patterns:
In applications with complex or unpredictable memory allocation patterns, intelligent memory could help identify and fix memory leaks or optimize resource allocation more efficiently.

2. Applications with Large Volumes of Data:
In applications that deal with large volumes of data or intensive processing, where every byte of memory is critical, memory optimization could have a significant impact on performance and scalability.

3. Critical or Long-Term Applications:
In critical applications, such as embedded systems or long-running servers, preventing memory leaks and optimizing memory usage can be essential to ensuring system stability and reliability over time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.