Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
NotificationsYou must be signed in to change notification settings

rust-osdev/linked-list-allocator

Repository files navigation

Crates.ioBuild Statusdocs.rs

Usage

Create a static allocator in your root module:

use linked_list_allocator::LockedHeap;#[global_allocator]staticALLOCATOR:LockedHeap =LockedHeap::empty();

Before using this allocator, you need to init it:

pubfninit_heap(){let heap_start = …;let heap_end = …;let heap_size = heap_end - heap_start;unsafe{ALLOCATOR.lock().init(heap_start, heap_size);}}

Features

  • use_spin (default): Provide aLockedHeap type that implements theGlobalAlloc trait by using a spinlock.
  • alloc_ref: Provide an implementation of the unstableAllocRef trait; requires nightly Rust.
    • Warning: TheAllocRef trait is still regularly changed on the Rust side, so expect some regular breakage when using this feature.

License

This crate is dual-licensed under MIT or the Apache License (Version 2.0). See LICENSE-APACHE and LICENSE-MIT for details.

About

No description, website, or topics provided.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Contributors22

Languages


[8]ページ先頭

©2009-2025 Movatter.jp