{"id":42298294,"url":"https://github.com/jurgen-kluft/csuperalloc","last_synced_at":"2026-01-27T10:17:03.735Z","repository":{"id":57645249,"uuid":"439276934","full_name":"jurgen-kluft/csuperalloc","owner":"jurgen-kluft","description":"virtual memory allocator","archived":false,"fork":false,"pushed_at":"2026-01-18T12:25:23.000Z","size":1560,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-18T19:09:24.416Z","etag":null,"topics":["chunks","configurable","external-bookkeeping","virtualalloc"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jurgen-kluft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"buy_me_a_coffee":"Jur93n"}},"created_at":"2021-12-17T09:23:52.000Z","updated_at":"2026-01-18T12:25:26.000Z","dependencies_parsed_at":"2024-05-22T13:43:22.484Z","dependency_job_id":"ec5ab9d0-826b-4907-b03b-583bcf714982","html_url":"https://github.com/jurgen-kluft/csuperalloc","commit_stats":{"total_commits":15,"total_committers":2,"mean_commits":7.5,"dds":"0.19999999999999996","last_synced_commit":"fdf2c5b4f8ca2022af31e193a615ef2359822cbd"},"previous_names":["jurgen-kluft/xsuperalloc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jurgen-kluft/csuperalloc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jurgen-kluft%2Fcsuperalloc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jurgen-kluft%2Fcsuperalloc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jurgen-kluft%2Fcsuperalloc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jurgen-kluft%2Fcsuperalloc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jurgen-kluft","download_url":"https://codeload.github.com/jurgen-kluft/csuperalloc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jurgen-kluft%2Fcsuperalloc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28811583,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["chunks","configurable","external-bookkeeping","virtualalloc"],"created_at":"2026-01-27T10:17:03.028Z","updated_at":"2026-01-27T10:17:03.727Z","avatar_url":"https://github.com/jurgen-kluft.png","language":"C++","funding_links":["https://buymeacoffee.com/Jur93n"],"categories":[],"sub_categories":[],"readme":"# A (virtual) memory allocator library\r\n\r\nA library that provides cross-platform usage of a virtual memory allocator.\r\n\r\nNote: See [ccode](https://github.com/jurgen-kluft/ccode) on how to generate the buildfiles.\r\n\r\n## Superalloc\r\n\r\nCurrently this allocator, called 'superalloc', is implemented in C++ and is around 1200 lines \r\nof code for the core.\r\nThis allocator is very configurable and all book-keeping data is outside of the managed memory\r\nmaking it very suitable for different types of memory (read-only, GPU etc..).\r\n\r\nIt only uses the following data structures:\r\n\r\n* array; plain old c style arrays\r\n* list; doubly linked list\r\n* binmap; N layer bit array\r\n\r\nExecution behaviour:\r\n\r\n* Allocation is done in O(1) time\r\n* Deallocation is done in O(1) time\r\n* Get size is done in O(1) time\r\n* Set / Get tag is done in O(1) time\r\n\r\n```c++\r\nclass vmalloc_t : public alloc_t\r\n{\r\npublic:\r\n    void* allocate(u32 size, u32 align);\r\n    void  deallocate(void*);\r\n\r\n    // Return the size that this allocation can use\r\n    u32 get_size(void*) const; \r\n      \r\n    // You can tag an allocation, very useful for attaching debug info \r\n    // to an allocation or using it as a CPU/GPU handle.\r\n    void  set_tag(void*, u32);\r\n    u32   get_tag(void*);\r\n    u32   get_size(void*);\r\n};\r\n```\r\n\r\nNote: Benchmarks are still to be done.  \r\nNote: Unittest contains a test called `stress test` that executes 512K operations (allocation / deallocation)\r\n\r\n## WIP\r\n\r\nSome things missing:\r\n\r\n- not multi-thread safe (wip)\r\n- cached chunks are not limited so nothing is released back in terms of unused physical pages. \r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjurgen-kluft%2Fcsuperalloc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjurgen-kluft%2Fcsuperalloc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjurgen-kluft%2Fcsuperalloc/lists"}