Skip to content

vvaucoul/Malloc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Malloc

The objective of the project is to faithfully recreate the malloc system of the library standard C. This repository, contains the complete project code and many tests. The project’s difficulty comes from using the 'MMAP' function and creating three stacks.

Bonuses done

  • Memory Hexdump. (show_alloc_mem_ex)
  • Thread Safe functions.
  • Memory défragmentation.

Usage

  • Clone Repository
git clone https://github.com/vvaucoul/Malloc && cd Malloc
  • Compilation
make
  • Tests Compilation
make tests

Replace Malloc system (pay attention to this one)

#!/bin/sh
export LD_LIBRARY_PATH=$PWD
export LD_INSERT_LIBRARIES="libft_malloc.so"
export LD_FORCE_FLAT_NAMESPACE=1
$@

Functions

void *malloc(size_t size);
void *realloc(void *ptr, size_t size);
void free(void *ptr);
void show_alloc_mem(void);
void show_alloc_mem_ex(void);

Ressources

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published