Skip to content

Just a terrible allocator PoC I am working on for fun

Notifications You must be signed in to change notification settings

P1tt1cus/PitAlloc

Repository files navigation

PitAlloc

PitAlloc is a basic memory allocator written in C++ that uses a bucket system. It is inspired by partition alloc and is currently a Proof of Concept (PoC).

Features

  • Bucket-based memory allocation
  • Singleton design pattern for allocator instance
  • Basic error handling
  • Allocation and deallocation (free) functions
  • Supports limited allocation sizes

Getting Started

Prerequisites

  • C++ compiler (e.g., g++, clang++)

Building

To compile the project, use the following commands in your terminal:

git clone https://github.com/P1tt1cus/PitAlloc.git
cd PitAlloc
clang++ -o *.cc -std=c++11

Usage

Below is an example of how to use PitAlloc:

#include "shim_cpp_exports.h"

int main() {
    // Allocate memory using overridden new operator
    int* ptr = new int[10];

    // Use allocated memory
    // ...

    // Free allocated memory using overridden delete operator
    delete[] ptr;

    return 0;
}

About

Just a terrible allocator PoC I am working on for fun

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published