{"id":25244846,"url":"https://github.com/slayers-git/leakchk","last_synced_at":"2025-04-05T21:15:48.461Z","repository":{"id":275697478,"uuid":"502545758","full_name":"slayers-git/leakchk","owner":"slayers-git","description":"Simple leak checker and allocation tracker for C/C++","archived":false,"fork":false,"pushed_at":"2022-06-12T07:23:07.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-12T01:41:25.201Z","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":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slayers-git.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-06-12T07:16:09.000Z","updated_at":"2022-06-12T07:17:45.000Z","dependencies_parsed_at":"2025-02-04T04:41:37.695Z","dependency_job_id":null,"html_url":"https://github.com/slayers-git/leakchk","commit_stats":null,"previous_names":["slayers-git/leakchk"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slayers-git%2Fleakchk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slayers-git%2Fleakchk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slayers-git%2Fleakchk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slayers-git%2Fleakchk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slayers-git","download_url":"https://codeload.github.com/slayers-git/leakchk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247399887,"owners_count":20932880,"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","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":"2025-02-12T01:37:04.028Z","updated_at":"2025-04-05T21:15:48.439Z","avatar_url":"https://github.com/slayers-git.png","language":"C","readme":"# LeakCHK\n\nLeakCHK is a simple, thread-safe leak checker that replaces the regular `stdlib.h` memory allocation functions with those, that track the number of allocations and the location where they happened.\n\n## Usage\n\n### Code\n\n```c\n#include \u003cleakchk.h\u003e\n\nint main (void) {\n    if (lc_init () != 0) {\n        return -1;\n    }\n\n    void *p = lc_malloc (23);\n\n    lc_deinit ();\n    return 0;\n}\n```\n\n### Output\n\n```bash\n$ gcc example.c -lleakchk\n$ ./a.out\nLEAKCHK: 1 tracked allocations have not been freed:\nLC_BLOCK @0xFFFFF67923A9:\n        size: 23, allocated in example.c:8 (function main)\n```\n\n## Building\n\nTo build the library on a \\*NIX system clone the repository and it's submodules:\n\n```bash\n$ git clone https://github.com/slayers-git/leakchk.git\n$ git submodule update --init\n```\n\nThen execute:\n\n```bash\n$ mkdir -p build \u0026\u0026 cd build \n$ cmake ../ \u0026\u0026 make\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslayers-git%2Fleakchk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslayers-git%2Fleakchk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslayers-git%2Fleakchk/lists"}