{"id":18339003,"url":"https://github.com/xoofx/varena","last_synced_at":"2025-09-09T15:39:22.171Z","repository":{"id":59001978,"uuid":"534934694","full_name":"xoofx/Varena","owner":"xoofx","description":"Varena is a .NET library that provides a fast and lightweight arena allocator using virtual memory.","archived":false,"fork":false,"pushed_at":"2024-03-17T14:05:20.000Z","size":85,"stargazers_count":192,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-27T18:47:58.874Z","etag":null,"topics":["allocator","arena-allocator","dotnet","virtual-memory"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xoofx.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","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},"funding":{"github":["xoofx"]}},"created_at":"2022-09-10T08:13:28.000Z","updated_at":"2025-08-26T17:06:24.000Z","dependencies_parsed_at":"2024-02-16T17:54:22.928Z","dependency_job_id":"d83ad3ca-d3dc-463d-a351-e2f088ff8cba","html_url":"https://github.com/xoofx/Varena","commit_stats":{"total_commits":15,"total_committers":2,"mean_commits":7.5,"dds":0.06666666666666665,"last_synced_commit":"4d86409565bdd0db590bade50b2045680db12659"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/xoofx/Varena","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xoofx%2FVarena","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xoofx%2FVarena/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xoofx%2FVarena/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xoofx%2FVarena/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xoofx","download_url":"https://codeload.github.com/xoofx/Varena/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xoofx%2FVarena/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274319215,"owners_count":25263228,"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":["allocator","arena-allocator","dotnet","virtual-memory"],"created_at":"2024-11-05T20:16:10.903Z","updated_at":"2025-09-09T15:39:21.438Z","avatar_url":"https://github.com/xoofx.png","language":"C#","funding_links":["https://github.com/sponsors/xoofx"],"categories":[],"sub_categories":[],"readme":"# Varena [![ci](https://github.com/xoofx/Varena/actions/workflows/ci.yml/badge.svg)](https://github.com/xoofx/Varena/actions/workflows/ci.yml) [![Coverage Status](https://coveralls.io/repos/github/xoofx/Varena/badge.svg?branch=main)](https://coveralls.io/github/xoofx/Varena?branch=main) [![NuGet](https://img.shields.io/nuget/v/Varena.svg)](https://www.nuget.org/packages/Varena/)\n\n\u003cimg align=\"right\" width=\"160px\" height=\"160px\" src=\"img/varena.png\"\u003e\n\nVarena is a .NET library that provides a fast and lightweight arena allocator using virtual memory.\n  \n## Features\n\n- Create very large continuous byte buffers and arrays (e.g 1 TiB) of data without committing the virtual memory to the physical memory.\n  - Only use the memory that is allocated, not the total capacity reserved!\n- Fast bump allocator with a commit per block (default is 64 KiB of memory committed)\n- Use `VirtualBuffer` for manipulating bytes.\n- Use `VirtualArray\u003cT\u003e` for manipulating a dynamic array of unmanaged data.\n- Compatible with `.NET6.0+` and on all platforms (Windows, Linux, macOS)\n\n## Usage\n\n```csharp\nusing Varena;\n\n// The manager keeps track of all created arenas (buffers, arrays)\nusing var manager = new VirtualArenaManager();\n\n// Create a byte buffer and reserve 1 GiB of continuous memory (but not yet allocated)\nvar arena1 = manager.CreateBuffer(\"Arena1\", 1 \u003c\u003c 30);\n// Allocate 1024 bytes -\u003e The arena commits a block 64 KiB of memory (configurable)\nvar span = arena1.AllocateRange(1024);\nspan[0] = 1;\n// Allocate 2048 bytes -\u003e The arena keeps allocating in the previous commit block of 64 KiB\nvar span2 = arena1.AllocateRange(2048);\nspan2[0] = 1;\n\n// Create a data array and reserve 1 MiB of continuous memory (but not yet allocated)\nvar arena2 = manager.CreateArray\u003cGuid\u003e(\"Arena2\", 1 \u003c\u003c 20);\n// Allocate sizeof(Guid) * 1024 bytes -\u003e The arena commits a block 64 KiB of memory (configurable)\nvar span3 = arena2.AllocateRange(1024);\nspan3[0] = Guid.NewGuid();\n```\n\n### Documentation\n\nYou will find more details about how to use Varena in this [user guide](https://github.com/xoofx/Varena/blob/main/doc/readme.md).\n\n## License\n\nThis software is released under the [BSD-Clause 2 license](https://opensource.org/licenses/BSD-2-Clause). \n\n## Author\n\nAlexandre Mutel aka [xoofx](https://xoofx.github.io).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxoofx%2Fvarena","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxoofx%2Fvarena","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxoofx%2Fvarena/lists"}