{"id":16722189,"url":"https://github.com/tkluck/refcycle-obliterate","last_synced_at":"2025-07-27T14:07:51.768Z","repository":{"id":147863902,"uuid":"101341974","full_name":"tkluck/RefCycle-Obliterate","owner":"tkluck","description":"Conservative garbage collector for Perl","archived":false,"fork":false,"pushed_at":"2020-02-14T13:58:59.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T13:22:53.401Z","etag":null,"topics":["garbage-collection","memory-leaks","memory-management","perl","perl5"],"latest_commit_sha":null,"homepage":"","language":"XS","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/tkluck.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":"2017-08-24T22:16:29.000Z","updated_at":"2020-02-14T13:59:02.000Z","dependencies_parsed_at":"2023-05-27T18:15:36.627Z","dependency_job_id":null,"html_url":"https://github.com/tkluck/RefCycle-Obliterate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tkluck/RefCycle-Obliterate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkluck%2FRefCycle-Obliterate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkluck%2FRefCycle-Obliterate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkluck%2FRefCycle-Obliterate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkluck%2FRefCycle-Obliterate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkluck","download_url":"https://codeload.github.com/tkluck/RefCycle-Obliterate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkluck%2FRefCycle-Obliterate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267368932,"owners_count":24076093,"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-07-27T02:00:11.917Z","response_time":82,"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":["garbage-collection","memory-leaks","memory-management","perl","perl5"],"created_at":"2024-10-12T22:33:57.708Z","updated_at":"2025-07-27T14:07:51.729Z","avatar_url":"https://github.com/tkluck.png","language":"XS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RefCycle::Obliterate - Conservative garbage collector for Perl\n[![][travis-img]][travis-url]\n\n[travis-img]: https://travis-ci.org/tkluck/RefCycle-Obliterate.svg?branch=master\n[travis-url]: https://travis-ci.org/tkluck/RefCycle-Obliterate\n\n## Quickstart\n\nInstallation:\n\n    perl Makefile.PL\n    make\n    make test \n    make install \n\nUse:\n\n```perl\nuse RefCycle::Obliterate;\nwhile(1) {\n    RefCycle::Obliterate::obliterate();\n\n    my $bar = {};\n    $bar-\u003e{bar} = $bar;\n} # Note how we don't get OOM-killed :)\n```\n\n## Description\n\nThe `obliterate()` function scans all Perl's `SV` structures and builds the tree of\nreferences. Any unreachable structures are freed. The algorithm used is a\nsimple mark-and-sweep.\n\nThe function is *conservative* in the sense that it does not claim to know about\nall the ways an `SV` can be referenced: currently, only `RV`s, arrays and\nhashes are supported. Even more generally, it would never be possible to know what\nreferences extension code holds, and where those are stored.\n\nThe function `obliterate()` only frees those cycles for which it can validate\nthat it knows about all the references: the `SvREFCOUNT` agrees with what we\ncompute.\n\nIn practice, this means that the roots of the reference tree are defined to be\nthose nodes that have a higher `SvREFCOUNT` than `obliterate()` computes.\n\n## Package name\n\nIn keeping with Perl's prosaic naming conventions (e.g. `die` for an exception,\n'mortal' scalar values, etc.), I decided against something more formal\nlike `Memory::GarbageCollector`.\n\n## Copyright\n\nCopyright (c) 1997-1998 Nick Ing-Simmons.\nCopyright (c) 2017 Timo Kluck.\n\nAll rights reserved.  This program is free software; you can redistribute it\nand/or modify it under the same terms as Perl itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkluck%2Frefcycle-obliterate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkluck%2Frefcycle-obliterate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkluck%2Frefcycle-obliterate/lists"}