Skip to content

ZiggyAlloc 1.4.0

Latest

Choose a tag to compare

@alexzzzs alexzzzs released this 04 Oct 11:21
· 3 commits to main since this release

Full Changelog: v1.2.6...v1.4.0

ZiggyAlloc v1.4.0 Release

Overview

ZiggyAlloc v1.4.0 introduces three new high-performance memory allocators and significant performance improvements across the library. This release focuses on advanced allocation strategies for modern hardware architectures and demanding applications.

New Features

ThreadLocalMemoryPool

  • High-performance thread-local memory allocator that eliminates lock contention for single-threaded scenarios
  • Supports optional cross-thread buffer sharing for mixed workloads
  • Demonstrates up to 40% performance improvement over standard MemoryPool in single-threaded scenarios
  • Zero contention overhead for thread-local operations

NumaAwareAllocator

  • NUMA-aware memory allocator optimized for multi-socket systems
  • Automatically allocates memory on the same NUMA node as the requesting thread
  • Provides 20-40% performance improvement on NUMA systems
  • Graceful fallback for non-NUMA systems with cross-platform compatibility

AlignedAllocator

  • Hardware-accelerated memory allocator with automatic alignment optimization
  • Delivers 10-30% performance improvements for SIMD operations
  • Supports multiple alignment strategies: Auto, Natural, CacheLine, SSE, AVX, AVX-512
  • Includes cross-platform CPU architecture detection and cache line size optimization

Enhanced Testing and Benchmarking

Comprehensive Test Suite

  • 450+ lines of validation code across all allocator implementations
  • Complete testing framework with 26 test methods covering edge cases and error conditions
  • Memory safety validation and resource management testing
  • Cross-platform compatibility verification

Advanced Benchmark System

  • 13 benchmark classes with logical grouping and categorization
  • Interactive benchmark selection with menu-driven interface
  • Comprehensive performance analysis across threading, memory, and optimization scenarios
  • Performance validation with detailed metrics and comparisons

Technical Improvements

Performance Optimizations

  • 25-40% improvement across typical allocation patterns
  • 15-25% better performance for multi-threaded applications
  • 10-30% improvement for large data processing workloads
  • Enhanced cache locality and reduced memory fragmentation

Code Quality Enhancements

  • Resolved all build warnings for clean compilation
  • Fixed test failures and improved test reliability
  • Enhanced code organization with centralized constants
  • Improved cross-platform compatibility for CPU and NUMA detection
  • Memory safety improvements and resource leak prevention

Files Changed

  • 32 files modified with 790 additions and 488 deletions
  • 1 new file: src/Allocators/AllocatorConstants.cs
  • Updated version to 1.4.0 across all project files
  • Enhanced CHANGELOG.md with detailed release notes

Installation

dotnet add package ZiggyAlloc --version 1.4.0

or

Install-Package ZiggyAlloc -Version 1.4.0

Quality Assurance

  • All dependencies verified and up-to-date
  • Release build validation completed successfully
  • Memory safety and resource management validated
  • Cross-platform compatibility confirmed
  • Comprehensive test coverage with all tests passing

Migration Guide

Breaking Changes

This release includes naming convention changes for consistency:

  • ScopedMemoryAllocator → ScopedAllocator
  • DebugMemoryAllocator → DebugAllocator

Migration Required

If you are using the old class names, update your code:

// Before (v1.3.0)
using var allocator = new ScopedMemoryAllocator();
using var debugAlloc = new DebugMemoryAllocator("Component", backingAllocator);

// After (v1.4.0)
using var allocator = new ScopedAllocator();
using var debugAlloc = new DebugAllocator("Component", backingAllocator);

Compatibility Notes

  • All other APIs remain unchanged
  • Existing code using SystemMemoryAllocator, UnmanagedMemoryPool, and other allocators requires no changes
  • Performance improvements benefit all existing code without modification

Support

For issues, questions, or contributions, please visit the GitHub repository.