{"id":22284725,"url":"https://github.com/schets/incrementalcompactor","last_synced_at":"2025-09-19T20:59:49.123Z","repository":{"id":74220034,"uuid":"115575047","full_name":"schets/IncrementalCompactor","owner":"schets","description":"Incremental GC for use in latency-sensitive settings","archived":false,"fork":false,"pushed_at":"2018-02-21T17:38:35.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-30T10:07:18.721Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/schets.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2017-12-28T02:12:58.000Z","updated_at":"2022-10-07T21:26:49.000Z","dependencies_parsed_at":"2023-09-28T07:05:27.026Z","dependency_job_id":null,"html_url":"https://github.com/schets/IncrementalCompactor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/schets/IncrementalCompactor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schets%2FIncrementalCompactor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schets%2FIncrementalCompactor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schets%2FIncrementalCompactor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schets%2FIncrementalCompactor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schets","download_url":"https://codeload.github.com/schets/IncrementalCompactor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schets%2FIncrementalCompactor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274306533,"owners_count":25261084,"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-09-09T02:00:10.223Z","response_time":80,"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-03T16:49:31.368Z","updated_at":"2025-09-19T20:59:49.112Z","avatar_url":"https://github.com/schets.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IncrementalGC\nIncremental GC for use in latency-sensitive settings\n\nBeginnings of a project to create an allocator that's friendly to latency-sensitive environments\nlike an object pool and friendly to the cache like a compacting GC.\nThe gist is that users manually specify times at which the compacting process can be run,\nand the GC will incrementally compact the memory.\n\nThe algorithm is as such:\n\nWhen scanning the graph (remember that the GC yields to main code during this):\n  \n  1. All objects are initially marked white.\n  2. When the collector reachs an object, it marks it grey.\n  3. Forwarding pointers will be placed in the old location and used to re-direct references\n  4. The first forwarded reference will be fixed, allowing an optimization on single-reference types\n  5. All forwarded references of objects are fixed\n  5. After compacting an object, the GC will non-incrementally check that all objects are scanned.\n  6. Once all objects are moved, the object is marked black\n  7. If an un-scanned object has been moved during this time, the tree is re-scanned\n  \nConcurrently with all of this, writers will mark on object as grey\nand set written flag when they move a currently living object\nfrom one location to another. The other cases, nullifying an object\nand adding a new object, don't require re-scanning since they do not\nmove references in memory at danger of being relocated.\n\nFurthermore, readers/writers are required to load a forwarding reference\ninstead of a regular one to ensure that writes make it to the new address.\nThis can be avoided if the type in question will only have one live reference\nthat is fixed in the initial move\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschets%2Fincrementalcompactor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschets%2Fincrementalcompactor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschets%2Fincrementalcompactor/lists"}