{"id":26633124,"url":"https://github.com/bra1l0r/palloc","last_synced_at":"2025-10-03T20:18:42.895Z","repository":{"id":57652464,"uuid":"425925252","full_name":"BRA1L0R/palloc","owner":"BRA1L0R","description":"Portable linked-list allocator designed for baremetal systems","archived":false,"fork":false,"pushed_at":"2021-11-11T17:09:58.000Z","size":36,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-15T20:06:37.005Z","etag":null,"topics":["allocator","no-std","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/palloc","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BRA1L0R.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-08T17:08:01.000Z","updated_at":"2023-04-04T14:26:17.000Z","dependencies_parsed_at":"2022-08-25T16:01:11.468Z","dependency_job_id":null,"html_url":"https://github.com/BRA1L0R/palloc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BRA1L0R/palloc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BRA1L0R%2Fpalloc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BRA1L0R%2Fpalloc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BRA1L0R%2Fpalloc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BRA1L0R%2Fpalloc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BRA1L0R","download_url":"https://codeload.github.com/BRA1L0R/palloc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BRA1L0R%2Fpalloc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278220330,"owners_count":25950445,"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","status":"online","status_checked_at":"2025-10-03T02:00:06.070Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["allocator","no-std","rust"],"created_at":"2025-03-24T15:13:46.489Z","updated_at":"2025-10-03T20:18:42.845Z","avatar_url":"https://github.com/BRA1L0R.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Palloc\n\n\u003ca href=\"https://docs.rs/palloc\"\u003e\u003cimg alt=\"docs.rs\" src=\"https://img.shields.io/docsrs/palloc\"\u003e\u003c/a\u003e\n\u003ca href=\"https://crates.io/crates/palloc\"\u003e\u003cimg alt=\"crates.io\" src=\"https://img.shields.io/crates/v/palloc\"\u003e\u003c/a\u003e\n\nPortable linked-list allocator for embedded / baremetal systems.\n\n### Using the crate\n\nInclude this in the `[dependencies]` section of `Cargo.toml`\n\n```\npalloc = \"0.1.0\"\n```\n\nThis crate uses **unstable features** of Rust, so it requires the `nightly` update channel. Update the toolchain\nfor your project folder with:\n\n```\nrustup override set nightly\n```\n\n### Crate features\n\n- `spin` (default): provides a GlobalAllocator implementation using a [spin lock](https://crates.io/crates/spin).\n- `allocator_api` (default): enables the Allocator trait and implements it on all global allocators.\n\n### Example\n\n```rust\n#![no_std]\n\nuse core::ptr::NonNull;\nuse palloc::{GlobalPalloc, SpinPalloc};\n\n// the allocator is initialized using a const empty function, but it is\n// not ready yet, we must initialize it first in main.\n#[global_allocator]\nstatic mut ALLOCATOR: SpinPalloc = SpinPalloc::empty();\n\nfn main() {\n    // First of all we must define the bounds of our heap. Check\n    // Palloc or GlobalPalloc documentation for informations.\n\n    // Heap starting address\n    let heap_start = 0x8000 as *mut u8;\n    // Heap size\n    let heap_size = 0xF000;\n\n    // accessing statics is an unsafe operation\n    // so it must be sorrounded by an unsafe block\n    unsafe { ALLOCATOR.init(NonNull::new(heap_start).unwrap(), heap_size) };\n\n    // we can now use the heap!\n    // ...\n}\n```\n\n### Documentation\n\nEverything you need to know is already written in the rustdocs.\nClick on the badge under the readme's title or [click here](https://docs.rs/palloc) to read the full\ndocumentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbra1l0r%2Fpalloc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbra1l0r%2Fpalloc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbra1l0r%2Fpalloc/lists"}