Skip to content

iwttairi/malloc_challenge

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

malloc_challenge

Open in Cloud Shell

  • malloc is the malloc challenge. Please read this doc and malloc/malloc.c for more information.
  • visualizer/ contains a visualizer of malloc traces.

Instruction

Your task is implement a better malloc logic in malloc.c to improve the speed and memory usage.

How to build & run a benchmark

# clone this repo
git clone https://github.com/hikalium/malloc_challenge.git

# move into malloc dir
cd malloc_challenge
cd malloc

# build
make

# run a benchmark (for score board)
make run

# run a small benchmark for tracing (NOT for score board, just for visualization and debugging purpose)
make run_trace

If the commands above don't work, please make sure the following packages are installed:

# For Debian-based OS
sudo apt install make clang

Alternatively, you can build and run the challenge directly by running:

gcc -Wall -O3 -lm -o malloc_challenge.bin main.c malloc.c simple_malloc.c
./malloc_challenge.bin

Acknowledgement

This work is based on xharaken's malloc_challenge.c. Thank you haraken-san!

Releases

No releases published

Packages

No packages published

Languages

  • C 65.6%
  • JavaScript 17.7%
  • C++ 6.9%
  • Makefile 6.0%
  • HTML 3.8%