{"id":26494716,"url":"https://github.com/nickscha/arena","last_synced_at":"2025-03-20T10:24:27.135Z","repository":{"id":279250920,"uuid":"937712563","full_name":"nickscha/arena","owner":"nickscha","description":"C89, single header, nostdlib arena/bump allocator","archived":false,"fork":false,"pushed_at":"2025-03-18T17:19:21.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T17:43:42.586Z","etag":null,"topics":["c89","nostdlib","single-header"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nickscha.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}},"created_at":"2025-02-23T18:12:14.000Z","updated_at":"2025-03-18T17:19:24.000Z","dependencies_parsed_at":"2025-02-24T16:33:47.854Z","dependency_job_id":"b76de79c-07a7-4c0f-ba02-8f9deca89773","html_url":"https://github.com/nickscha/arena","commit_stats":null,"previous_names":["nickscha/arena"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickscha%2Farena","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickscha%2Farena/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickscha%2Farena/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickscha%2Farena/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nickscha","download_url":"https://codeload.github.com/nickscha/arena/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244592962,"owners_count":20477990,"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":["c89","nostdlib","single-header"],"created_at":"2025-03-20T10:24:26.574Z","updated_at":"2025-03-20T10:24:27.114Z","avatar_url":"https://github.com/nickscha.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# arena\nA C89 standard compliant, single header, nostdlib (no C Standard Library) arena/bump allocator\n\nFor more information please look at the \"arena.h\" file or take a look at the \"examples\" or \"tests\" folder.\n\n## Quick Start\n\nDownload or clone arena.h and include it in your project.\n\n```C\n#include \"arena.h\"\n\nint main() {\n    int   *arr;\n    float *arr2;\n\n    arena arena = {0};\n    arena_init(\u0026arena, 1024 * 1024 * 10); /* 1 MB Arena*/\n\n    arr = (int *)arena_malloc(\u0026arena, 10 * sizeof(int));\n    if (!arr)\n    {\n        return 1; /* Arena Memory has not enough space to add this type */\n    }\n\n    /* Allocate another array in the arena */    \n    arr2 = (float *)arena_malloc(\u0026arena, 1024 * sizeof(float));\n\n    if (!arr2)\n    {\n        return 1; /* Arena Memory has not enough space to add this type */\n    }\n\n    /* Increase size of the first array to 13 */\n    arr = arena_realloc(\u0026arena, arr, 13 * sizeof(int));\n\n    arena_free(\u0026arena);\n\n    return 0;\n}\n```\n\n## \"nostdlib\" Motivation \u0026 Purpose\n\nnostdlib is a lightweight, minimalistic approach to C development that removes dependencies on the standard library. The motivation behind this project is to provide developers with greater control over their code by eliminating unnecessary overhead, reducing binary size, and enabling deployment in resource-constrained environments.\n\nMany modern development environments rely heavily on the standard library, which, while convenient, introduces unnecessary bloat, security risks, and unpredictable dependencies. nostdlib aims to give developers fine-grained control over memory management, execution flow, and system calls by working directly with the underlying platform.\n\n### Benefits\n\n#### Minimal overhead\nBy removing the standard library, nostdlib significantly reduces runtime overhead, allowing for faster execution and smaller binary sizes.\n\n#### Increased security\nStandard libraries often include unnecessary functions that increase the attack surface of an application. nostdlib mitigates security risks by removing unused and potentially vulnerable components.\n\n#### Reduced binary size\nWithout linking to the standard library, binaries are smaller, making them ideal for embedded systems, bootloaders, and operating systems where storage is limited.\n\n#### Enhanced performance\nDirect control over system calls and memory management leads to performance gains by eliminating abstraction layers imposed by standard libraries.\n\n#### Better portability\nBy relying only on fundamental system interfaces, nostdlib allows for easier porting across different platforms without worrying about standard library availability.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickscha%2Farena","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickscha%2Farena","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickscha%2Farena/lists"}