Skip to content

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

License

Notifications You must be signed in to change notification settings

jakubtomsu/odin-mimalloc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published