Skip to content

Developed a Nested Doubly Linked list structure for managing memory segments, preventing fragmentation and optimizing memory usage/

Notifications You must be signed in to change notification settings

Parasv17/MeMS_Custom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MeMS: Memory Management System.

Introduction

The MeMS (Memory Management System) is a custom memory management system implemented in C. It provides a way to allocate, deallocate, and manage memory in a controlled virtual address space.

Implementation

Data Structures

  • NODE: Represents a block of memory in the main chain, containing size, virtual address range, and a linked list of sub-chains.
  • SUB_NODE: Represents a segment within a NODE, can be either a "PROCESS" or a "HOLE", containing size and address range information.

Functions

  • mems_init(): Initializes the MeMS system.
  • mems_malloc(size_t size): Allocates memory of the specified size.
  • mems_free(void *v_ptr): Frees the memory pointed to by a MeMS virtual address.
  • mems_get(void *v_ptr): Returns the MeMS physical address mapped to a MeMS virtual address.
  • mems_print_stats(): Prints statistics about the MeMS system.
  • mems_finish(): Cleans up the MeMS system.

Example Usage

The provided example demonstrates the usage of MeMS functions: allocating memory, assigning values, printing statistics, and releasing memory.

Building and Running

Prerequisites

  • GCC (GNU Compiler Collection)

Instructions

  1. Clone the repository:
    git clone https://github.com/Parasv17/MeMS_Custom.git
    cd mems
  2. Build And Run
    make
    

For detailed documentation, refer to the Documentation.

About

Developed a Nested Doubly Linked list structure for managing memory segments, preventing fragmentation and optimizing memory usage/

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published