Malloc Lab: simple memory allocator using sorted segregated free list

LAB 6: Malloc Lab

Main Files

mm.{c,h} - Your solution malloc package.

mdriver.c - The malloc driver that tests your mm.c file

short{1,2}-bal.rep - Two tiny tracefiles to help you get started. 

Makefile - Builds the driver

Other support files for the driver

  • config.h Configures the malloc lab driver

  • fsecs.{c,h} Wrapper function for the different timer packages

  • clock.{c,h} Routines for accessing the Pentium and Alpha cycle counters

  • fcyc.{c,h} Timer functions based on cycle counters

  • ftimer.{c,h} Timer functions based on interval timers and gettimeofday()

  • memlib.{c,h} Models the heap and sbrk function

Testing Malloc with Mdriver

To build the driver, type "make" to the shell.

To run the driver on a tiny test trace:

unix> mdriver -V -f short1-bal.rep

The -V option prints out helpful tracing and summary information.

To get a list of the driver flags:

unix> mdriver -h
Similar Resources

A poggers malloc implementation

pogmalloc(3) A poggers malloc implementation Features Static allocator Real heap allocator (via sbrk(2)) Builtin GC Can also mark static memory Can be

Jun 12, 2022

Mimalloc-bench - Suite for benchmarking malloc implementations.

Mimalloc-bench - Suite for benchmarking malloc implementations.

Mimalloc-bench Suite for benchmarking malloc implementations, originally developed for benchmarking mimalloc. Collection of various benchmarks from th

Dec 24, 2022

mimalloc is a compact general purpose allocator with excellent performance.

mimalloc is a compact general purpose allocator with excellent performance.

mimalloc mimalloc (pronounced "me-malloc") is a general purpose allocator with excellent performance characteristics. Initially developed by Daan Leij

Dec 30, 2022

Snmalloc - Message passing based allocator

snmalloc snmalloc is a high-performance allocator. snmalloc can be used directly in a project as a header-only C++ library, it can be LD_PRELOADed on

Jan 9, 2023

Custom memory allocators in C++ to improve the performance of dynamic memory allocation

Custom memory allocators in C++ to improve the performance of dynamic memory allocation

Table of Contents Introduction Build instructions What's wrong with Malloc? Custom allocators Linear Allocator Stack Allocator Pool Allocator Free lis

Jan 2, 2023

MMCTX (Memory Management ConTeXualizer), is a tiny ( 300 lines), single header C99 library that allows for easier memory management by implementing contexts that remember allocations for you and provide freeall()-like functionality.

MMCTX (Memory Management ConTeXualizer), is a tiny ( 300 lines), single header C99 library that allows for easier memory management by implementing contexts that remember allocations for you and provide freeall()-like functionality.

Oct 2, 2021

Memory-dumper - A tool for dumping files from processes memory

What is memory-dumper memory-dumper is a tool for dumping files from process's memory. The main purpose is to find patterns inside the process's memor

Nov 9, 2022

A simple windows driver that can read and write to process memory from kernel mode

ReadWriteProcessMemoryDriver A simple windows driver that can read and write to process memory from kernel mode This was just a small project for me t

Dec 7, 2022

Known ring3 memory protections that can be handled at a simple level.

Known ring3 memory protections that can be handled at a simple level.

EasySafe Known ring3 memory protections that can be handled at a simple level. Example usage Check Example.cpp Syscall hooking Add a syscall hook Spec

Oct 27, 2022
STL compatible C++ memory allocator library using a new RawAllocator concept that is similar to an Allocator but easier to use and write.

memory The C++ STL allocator model has various flaws. For example, they are fixed to a certain type, because they are almost necessarily required to b

Dec 26, 2022
STL compatible C++ memory allocator library using a new RawAllocator concept that is similar to an Allocator but easier to use and write.
STL compatible C++ memory allocator library using a new RawAllocator concept that is similar to an Allocator but easier to use and write.

STL compatible C++ memory allocator library using a new RawAllocator concept that is similar to an Allocator but easier to use and write.

Dec 2, 2021
Hardened malloc - Hardened allocator designed for modern systems

Hardened malloc - Hardened allocator designed for modern systems. It has integration into Android's Bionic libc and can be used externally with musl and glibc as a dynamic library for use on other Linux-based platforms. It will gain more portability / integration over time.

Jan 3, 2023
Public domain cross platform lock free thread caching 16-byte aligned memory allocator implemented in C
Public domain cross platform lock free thread caching 16-byte aligned memory allocator implemented in C

rpmalloc - General Purpose Memory Allocator This library provides a public domain cross platform lock free thread caching 16-byte aligned memory alloc

Dec 28, 2022
Mesh - A memory allocator that automatically reduces the memory footprint of C/C++ applications.
Mesh - A memory allocator that automatically reduces the memory footprint of C/C++ applications.

Mesh: Compacting Memory Management for C/C++ Mesh is a drop in replacement for malloc(3) that can transparently recover from memory fragmentation with

Dec 30, 2022
Custom implementation of C stdlib malloc(), realloc(), and free() functions.

C-Stdlib-Malloc-Implementation NOT INTENDED TO BE COMPILED AND RAN, DRIVER CODE NOT OWNED BY I, ARCINI This is a custom implmentation of the standard

Dec 27, 2021
A tiny portable C89 memory allocator

mem A tiny portable C89 memory allocator. Usage This is a single-header library. You must include this file alongside #define MEM_IMPLEMENTATION in on

Nov 20, 2022
Allocator bench - bench of various memory allocators

To run benchmarks Install lockless from https://locklessinc.com/downloads/ in lockless_allocator path make Install Hoard from https://github.com/emery

Dec 4, 2022
jemalloc websitejemalloc - General purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support. [BSD] website

jemalloc is a general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support. jemalloc first came

Jan 7, 2023
Test your malloc protection
Test your malloc protection

Test your allocs protections and leaks ! Report Bug ยท Request Feature Table of Contents About The Tool Getting Started Prerequisites Quickstart Usage

Dec 7, 2022