alleakator

Crates.ioalleakator
lib.rsalleakator
version1.0.4
sourcesrc
created_at2019-08-31 15:01:07.528115
updated_at2019-08-31 16:28:35.665933
descriptionleaking global allocator
homepage
repositoryhttps://github.com/TimonPasslick/alleakator
max_upload_size
id161159
size3,843
Timon Paßlick (TimonPasslick)

documentation

README

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.

Commit count: 16

cargo fmt