Files
Misaki.HighPerformance/Misaki.HighPerformance.Unsafe/Collections/AllocationOption.cs
Misaki 1e00f4eb25 Enhance memory management and data structures
Updated `CollectionBenchmark` for setup/cleanup methods,
streamlined benchmarking in `Program.cs`, and improved
documentation in `AllocationOption` and `Allocator` enums.
Made `Enumerator` structs public in several collections
and clarified constructor parameters. Introduced a new
`UnsafeStack` struct for stack operations. Enhanced
`AllocationManager` with better memory tracking and
management, ensuring proper allocation and disposal.
2025-04-03 15:47:43 +09:00

33 lines
969 B
C#

namespace Misaki.HighPerformance.Unsafe.Collections;
public enum AllocationOption : byte
{
/// <summary>
/// Allocator for uninitialized memory
/// </summary>
UnInitialized,
/// <summary>
/// Allocator for initialized memory.
/// </summary>
Clear,
/// <summary>
/// Allocator for untracked memory.
/// Use this option carefully, as the allocation manager will not track the memory.
/// No warning will be given if the memory is not freed.
/// </summary>
UnTracked
}
public enum Allocator : byte
{
// Make the first allocator as invalid because we don't want to user create a defualt collection without passing any parameters
Invalid,
/// <summary>
/// Allocator for temporary allocations. Allocations are cleared after use.
/// </summary>
Temp,
/// <summary>
/// Allocator for persistent allocations. Allocations are not cleared after use.
/// </summary>
Persistent,
}