Hallocy/README.md

1.7 KiB

Hallocy

An advanced allocator library for C.

Introduction

Hallocy is an advanced C allocator library. This library implements the standard malloc, calloc, realloc, free, memset, memcopy, memmove and memcmp functions. The aim of this library is to be a better version of the standard C allocator by improving performance. Hallocy supports both Windows and Linux also keeping multithreading in mind.

Features

The hallocy library offers the following features:

  • Allocating and freeing memory
  • Zeroing memory on allocation
  • Reallocating memory
  • Copying and moving memory
  • Setting memory
  • Comparing memory

Installation

Prerequisites

Ensure you have the following installed on your system:

  • CMake (minimum version 3.10)
  • A compatible C compiler (e.g., GCC or MSVC)

Build Steps

  1. Clone the repository:

    git clone https://repo.strawhats.nl/Mineplay/Hallocy.git
    
  2. Navigate to the directory:

    cd Hallocy
    
  3. Create build directory and navigate to it:

    mkdir Build && cd Build
    
  4. Run CMake to configure project:

    cmake ..
    
  5. Build the project:

    cmake --build . --config Release
    

    To build in debug use:

    cmake --build . 
    

    This will both generate the library and test files.

Using the library

The library file can be found in the ./Build/Release folder as Hallocy.lib for windows and in ./Build folder as libHallocy.a for linux. To use the library file you will need to copy the Hallocy folder containing the header files and follow the setup process for a library in the build system you are using.

For more info about how to use the library see the documentation folder named Docs.