{"id":58703,"library":"linked-list-allocator","title":"Linked List Allocator","description":"Simple allocator for no_std systems using a linked list of freed blocks.","status":"active","version":"0.10.6","language":"rust","source_language":null,"source_url":"https://github.com/phil-opp/linked-list-allocator","tags":["allocator","no-std","embedded","memory"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nlinked_list_allocator = \"0.10.6\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add linked_list_allocator","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"LockedHeap","correct":"use linked_list_allocator::LockedHeap;"}],"quickstart":{"code":"use linked_list_allocator::LockedHeap;\n\n#[global_allocator]\nstatic ALLOCATOR: LockedHeap = LockedHeap::empty();\n\nfn main() {\n    let heap_start = 0x1000 as *mut u8;\n    let heap_size = 4096;\n    unsafe { ALLOCATOR.lock().init(heap_start, heap_size); }\n    let _box = Box::new(42);\n}","lang":"rust","description":"Initialize a global allocator with a fixed heap region."},"warnings":[{"fix":"Use `LockedHeap` (which wraps a spinlock) instead of `Heap` directly.","message":"The allocator is not thread-safe by default; use LockedHeap for global usage.","severity":"gotcha","affected_versions":">=0.10.0"}],"env_vars":null,"search_vec":"'alloc':3,5,17 'block':16 'embed':21 'freed':15 'link':1,12 'list':2,13 'memori':22 'no-std':18 'simpl':4 'std':8,20 'system':9 'use':10","created_at":"2026-06-16T16:35:30.893835+00:00","updated_at":"2026-06-16T16:35:30.893835+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://os.phil-opp.com/kernel-heap.html#a-better-allocator","github":"https://github.com/phil-opp/linked-list-allocator","docs":"https://docs.rs/linked_list_allocator/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["other"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-16","next_check":"2026-12-13","install_tag":null}}