Coder Social home page Coder Social logo

timhwang777 / memory-allocator-in-c Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 5 KB

This C project presents a custom memory manager offering diverse allocation strategies like best/worst/first/next fit and buddy system. With initialization, allocation, freeing, and debugging functionalities, it empowers flexible and insightful memory management.

Makefile 1.60% C 98.40%

memory-allocator-in-c's Introduction

Memory Allocator in C

c-badge

Table of Contents

About the Project

This project implements a custom memory management system in C, designed to provide various memory allocation strategies such as best fit, worst fit, first fit, next fit, and buddy system. It includes functions for initializing the memory region, allocating and freeing memory, and utilities for debugging memory state.

Getting Started

Project Overview

The system uses a linked list to manage memory blocks within a pre-allocated memory region. Each block contains metadata for managing the allocation and deallocation processes. The allocation algorithms can be selected during the initialization phase, supporting flexible memory management strategies tailored to specific application needs.

Prerequisites

  • A Linux environment or a similar system with support for POSIX APIs.
  • GCC compiler for building the project.
  • Basic understanding of memory management concepts and C programming.

Environment Setup

  1. Clone the repository to your local machine.
  2. Ensure you have GCC installed by running gcc --version. Install GCC if it's not installed.
  3. Navigate to the project directory where the source code is located.
  4. To compile the program, use the following commands:
gcc -o umem umem.c

Build and Run with Make

  1. To compile the project, run make in the terminal within the project directory. This will create the executable named main as specified in the Makefile.
  2. To execute the program, run ./main in the terminal. This command will run the compiled program.

Author

Timothy Hwang

memory-allocator-in-c's People

Contributors

timhwang777 avatar

Watchers

 avatar

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.