Skip to content

TimonPasslick/alleakator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alleakator

alt=crocodile

alleakator provides a global allocator that leaks memory on purpose.

Motivation

If you have a step based program that only runs for a short time, leaking memory is okay - and the fastest computations are the ones that aren't done.

This crate avoids the runtime overhead of freeing memory by just not doing it.

Usage

Add this to your main.rs:

use alleakator::Alleakator;

#[global_allocator]
static GLOBAL: Alleakator<YourAllocator> = Alleakator<YourAllocator>;

This works even if you don't use the standard library.

Implementation

All function calls are forwarded to a parent allocator that you can specify except dealloc, which is just empty.

Contributing

Contributions are welcome.

License

MIT

Trivia

The image shows a crocodile.

About

a leaking global allocator for Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages