![]() |
VOOZH | about |
dotnet add package Varena --version 1.2.0
NuGet\Install-Package Varena -Version 1.2.0
<PackageReference Include="Varena" Version="1.2.0" />
<PackageVersion Include="Varena" Version="1.2.0" />Directory.Packages.props
<PackageReference Include="Varena" />Project file
paket add Varena --version 1.2.0
#r "nuget: Varena, 1.2.0"
#:package Varena@1.2.0
#addin nuget:?package=Varena&version=1.2.0Install as a Cake Addin
#tool nuget:?package=Varena&version=1.2.0Install as a Cake Tool
<img align="right" width="160px" height="160px" src="img/varena.png">
Varena is a .NET library that provides a fast and lightweight arena allocator using virtual memory.
VirtualBuffer for manipulating bytes.VirtualArray<T> for manipulating a dynamic array of unmanaged data..NET6.0+ and on all platforms (Windows, Linux, macOS)using Varena;
// The manager keeps track of all created arenas (buffers, arrays)
using var manager = new VirtualArenaManager();
// Create a byte buffer and reserve 1 GiB of continuous memory (but not yet allocated)
var arena1 = manager.CreateBuffer("Arena1", 1 << 30);
// Allocate 1024 bytes -> The arena commits a block 64 KiB of memory (configurable)
var span = arena1.AllocateRange(1024);
span[0] = 1;
// Allocate 2048 bytes -> The arena keeps allocating in the previous commit block of 64 KiB
var span2 = arena1.AllocateRange(2048);
span2[0] = 1;
// Create a data array and reserve 1 MiB of continuous memory (but not yet allocated)
var arena2 = manager.CreateArray<Guid>("Arena2", 1 << 20);
// Allocate sizeof(Guid) * 1024 bytes -> The arena commits a block 64 KiB of memory (configurable)
var span3 = arena2.AllocateRange(1024);
span3[0] = Guid.NewGuid();
You will find more details about how to use Varena in this user guide.
This software is released under the BSD-Clause 2 license.
Alexandre Mutel aka xoofx.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on Varena:
| Package | Downloads |
|---|---|
|
Flamui.Core
A desktop UI framework |
Showing the top 1 popular GitHub repositories that depend on Varena:
| Repository | Stars |
|---|---|
|
stark-lang/stark
Main repository for the stark compiler frontend + vscode integration + language specs
|