/odin-mimalloc

Odin bindings for mimalloc (https://github.com/microsoft/mimalloc). mimalloc is a compact general purpose allocator with excellent performance.

Primary LanguageCMIT LicenseMIT

odin-mimalloc

Odin bindngs for mimalloc

mimalloc (pronounced "me-malloc") is a general purpose allocator with excellent performance characteristics.

WIP - only builds on windows and not all functions were tested.

Usage

Mimalloc API documentation

Simply copy the mimalloc folder somewhere into your project. Then you can just import it:

import mi "mimalloc"

Now you can use all the mimalloc functions. No global init required.

How to override the default context.allocator:

context.allocator = mi.global_allocator()

Or with a custom heap:

heap := mi.heap_new()
context.allocator = mi.heap_allocator(heap)
// ...
mi.heap_destroy(heap)
// Here you might want to restore the context.allocator