{"id":22124205,"url":"https://github.com/federicoponzi/libsmalloc","last_synced_at":"2026-06-23T04:31:49.316Z","repository":{"id":74371143,"uuid":"498427367","full_name":"FedericoPonzi/libsmalloc","owner":"FedericoPonzi","description":"A custom malloc implementation","archived":false,"fork":false,"pushed_at":"2023-07-07T22:56:54.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-02T13:56:20.802Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FedericoPonzi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-05-31T17:09:42.000Z","updated_at":"2022-09-03T22:44:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"075a1eed-b2bb-45a8-8a9f-65ecfeec56a6","html_url":"https://github.com/FedericoPonzi/libsmalloc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FedericoPonzi/libsmalloc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FedericoPonzi%2Flibsmalloc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FedericoPonzi%2Flibsmalloc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FedericoPonzi%2Flibsmalloc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FedericoPonzi%2Flibsmalloc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FedericoPonzi","download_url":"https://codeload.github.com/FedericoPonzi/libsmalloc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FedericoPonzi%2Flibsmalloc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34675970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"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":[],"created_at":"2024-12-01T15:46:52.641Z","updated_at":"2026-06-23T04:31:49.297Z","avatar_url":"https://github.com/FedericoPonzi.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libsmalloc\nA simple malloc (free, realloc, calloc) implementation in Rust.\n\n```\n# Test it as:\ncargo build \u0026\u0026 LD_PRELOAD=$(readlink -f target/debug/libsmalloc.so) ls\n```\n\n## TODO:\n* Fix thread-safety\n* defer allocations larger than a page size to mmap\n* set errno on failure.\n* allocate more space (bigger sbrk) in advance.\n* Dellocate memory on free if possible.\n* \n----\n# C tests\nI've also included some small c programs to test the behaviours. Nothing fancy, I run them like this:\n```\n(cd ../ \u0026\u0026 cargo build ) \u0026\u0026 gcc malloc.c \u0026\u0026 LD_PRELOAD=$(readlink -f ../target/debug/libsmalloc.so) ./a.out \n\n# run all:\n(cd ../ \u0026\u0026 cargo build )\nfor i in *.c ; do \n     gcc $i \u0026\u0026 LD_PRELOAD=$(readlink -f ../target/debug/libsmalloc.so) ./a.out \n     echo \"----------\"\ndone\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffedericoponzi%2Flibsmalloc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffedericoponzi%2Flibsmalloc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffedericoponzi%2Flibsmalloc/lists"}