lhutton1 / memory-management

Simple implementation of malloc and free using sbrk system calls

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Memory-management.c

Provides an implementation of the malloc and free functions. This implementation allows you to create a block on the heap and free it from memory, whilst ensuring the blocks are aligned correctly for the x86 architecture requirements.

How to use

Make sure that you are on a linux machine that is capable of using the sbrk() system call. Ensure that the correct padding for your machine is set by changing the ALIGNMENT and PAGE_SIZE constants. Then compile using a standard c compiler e.g: gcc memory-management.c -o memory-management

About

Simple implementation of malloc and free using sbrk system calls


Languages

Language:C 100.0%