{"id":15760697,"url":"https://github.com/erikgartner/custom-linux-alloc","last_synced_at":"2026-05-05T07:33:00.040Z","repository":{"id":79362902,"uuid":"57372860","full_name":"ErikGartner/custom-linux-alloc","owner":"ErikGartner","description":"Custom implementations of malloc, calloc, free and realloc.","archived":false,"fork":false,"pushed_at":"2016-06-05T10:34:23.000Z","size":2986,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-31T09:19:17.058Z","etag":null,"topics":["alloc","linux","linux-kernel","malloc"],"latest_commit_sha":null,"homepage":"","language":"C","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/ErikGartner.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":"2016-04-29T09:22:23.000Z","updated_at":"2024-01-02T14:24:41.000Z","dependencies_parsed_at":"2023-04-17T13:59:05.319Z","dependency_job_id":null,"html_url":"https://github.com/ErikGartner/custom-linux-alloc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ErikGartner/custom-linux-alloc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErikGartner%2Fcustom-linux-alloc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErikGartner%2Fcustom-linux-alloc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErikGartner%2Fcustom-linux-alloc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErikGartner%2Fcustom-linux-alloc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ErikGartner","download_url":"https://codeload.github.com/ErikGartner/custom-linux-alloc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErikGartner%2Fcustom-linux-alloc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32640534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"online","status_checked_at":"2026-05-05T02:00:06.033Z","response_time":54,"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":["alloc","linux","linux-kernel","malloc"],"created_at":"2024-10-04T10:59:48.443Z","updated_at":"2026-05-05T07:33:00.007Z","avatar_url":"https://github.com/ErikGartner.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Heap Managers - OS project\n\n## Running\n1. `cd ./tests/gawk-3.1.8` and `./configure`.\n2. `cd ../../` to root folder and run one of `make linked_gawk` or `make buddy_gawk` or `make minitest` to test.\n\n## Description\n1. Your task is to implement two versions of malloc/calloc/realloc and free.\n2. One should be a linked-list implementation and the other an implementation of the buddy system.\n3. You must use sbrk to allocate memory from the kernel.\n4. Your implementations should work with gawk.\n5. Download gawk and type configure and make check.\n6. Then edit the Makefile to use your malloc implementation. To edit the Makefile, look for places where version is used and add your file in the same way.\n7. Then type make check again.\n8. Repeat for your other malloc implementation.\n\n### Linked list\nThis rather naïve implementation resides in [linked_alloc.c](./linked_alloc.c).\n\n### Buddy allocator\nThe implementation resides in [buddy_alloc.c](./buddy_alloc.c).\n\n### Useful links\n* [A Memory Allocator by Doug Lea](http://g.oswego.edu/dl/html/malloc.html)\n* [Implementing Malloc (iit.edu)](http://moss.cs.iit.edu/cs351/slides/slides-malloc.pdf)\n* [Stackoverflow answer](http://stackoverflow.com/questions/5422061/malloc-implementation)\n* [A quick tutorial on implementing and debugging malloc, free, calloc, and realloc by Danluu](http://danluu.com/malloc-tutorial/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikgartner%2Fcustom-linux-alloc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferikgartner%2Fcustom-linux-alloc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikgartner%2Fcustom-linux-alloc/lists"}