{"id":13599907,"url":"https://github.com/rust-osdev/linked-list-allocator","last_synced_at":"2025-12-12T16:48:41.680Z","repository":{"id":39897915,"uuid":"49971139","full_name":"rust-osdev/linked-list-allocator","owner":"rust-osdev","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-30T08:20:04.000Z","size":213,"stargazers_count":227,"open_issues_count":10,"forks_count":54,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-30T06:07:26.188Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rust-osdev.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-19T17:46:59.000Z","updated_at":"2025-01-27T13:54:09.000Z","dependencies_parsed_at":"2023-01-21T04:15:11.832Z","dependency_job_id":"29357047-ed6e-48bd-9da7-07af85d68fa6","html_url":"https://github.com/rust-osdev/linked-list-allocator","commit_stats":{"total_commits":215,"total_committers":22,"mean_commits":9.772727272727273,"dds":"0.26046511627906976","last_synced_commit":"a3985a707643461727d3b8ca5797d9cc3f446069"},"previous_names":["phil-opp/linked-list-allocator"],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-osdev%2Flinked-list-allocator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-osdev%2Flinked-list-allocator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-osdev%2Flinked-list-allocator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-osdev%2Flinked-list-allocator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rust-osdev","download_url":"https://codeload.github.com/rust-osdev/linked-list-allocator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246811245,"owners_count":20837745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T17:01:17.238Z","updated_at":"2025-12-12T16:48:41.605Z","avatar_url":"https://github.com/rust-osdev.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# linked-list-allocator\n\n[![Crates.io](https://img.shields.io/crates/v/linked-list-allocator)](https://crates.io/crates/linked-list-allocator)\n[![Build Status](https://github.com/rust-osdev/linked-list-allocator/workflows/Build/badge.svg)](https://github.com/rust-osdev/linked-list-allocator/actions?query=workflow%3ABuild)\n[![docs.rs](https://img.shields.io/badge/docs.rs-documentation-green.svg)](https://docs.rs/linked-list-allocator)\n\n## Usage\n\nCreate a static allocator in your root module:\n\n```rust\nuse linked_list_allocator::LockedHeap;\n\n#[global_allocator]\nstatic ALLOCATOR: LockedHeap = LockedHeap::empty();\n```\n\nBefore using this allocator, you need to init it:\n\n```rust\npub fn init_heap() {\n    let heap_start = …;\n    let heap_end = …;\n    let heap_size = heap_end - heap_start;\n    unsafe {\n        ALLOCATOR.lock().init(heap_start, heap_size);\n    }\n}\n```\n\n## Features\n\n- **`use_spin`** (default): Provide a `LockedHeap` type that implements the [`GlobalAlloc`] trait by using a spinlock.\n- **`alloc_ref`**: Provide an implementation of the unstable [`AllocRef`] trait; requires nightly Rust.\n    - Warning: The `AllocRef` trait is still regularly changed on the Rust side, so expect some regular breakage when using this feature.\n\n[`GlobalAlloc`]: https://doc.rust-lang.org/nightly/core/alloc/trait.GlobalAlloc.html\n[`AllocRef`]: https://doc.rust-lang.org/nightly/core/alloc/trait.AllocRef.html\n\n## License\nThis crate is dual-licensed under MIT or the Apache License (Version 2.0). See LICENSE-APACHE and LICENSE-MIT for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-osdev%2Flinked-list-allocator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-osdev%2Flinked-list-allocator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-osdev%2Flinked-list-allocator/lists"}