Post B0kAXcbHddq1ZmLxOC by SlicerDicer@friedcheese.us
 (DIR) More posts by SlicerDicer@friedcheese.us
 (DIR) Post #B0kAXcbHddq1ZmLxOC by SlicerDicer@friedcheese.us
       2025-11-29T16:47:52.381608Z
       
       1 likes, 0 repeats
       
       Ever decide to build a memory manager from the ground up and test it on 15 year old hardware and watch it hit hardware speed limit? This has taken me a year and many many iterations. If you want to know how to build a memory management system that is able to pass the most horrifying stress tests and not break? Well it’s too much to write. Sorry. It can be done. I’ll post the full stress test results when I have time. I’m too busy integrating this in the project i built it for. This to power a rebreather controller and decompression computer as well. I want to make one better than what’s out there. The fragmentation tests, circular buffer tests and double buffer tests are off the charts crazy. === EXTREME STRESS TEST: TORTURING THE ARENA ===✓ Arena system initialized (32MB arena)Test 1: Extreme Size Variation (1 byte to 128KB allocations)  Testing arena's ability to handle vastly different allocation sizes  Result: 804.00 μs for 15,000 allocations of varying sizesTest 2: Allocation Storm (1,000,000 allocations)  Testing maximum allocation speed under pressure  Result: 14863.00 μs for 1,000,000 allocations (1M/sec = 1μs each)Test 3: Memory Pressure Simulation  Testing arena behavior when 80% full  Result: 22417.00 μs - arena handles pressure without degradationTest 4: Rapid Reset Stress  Testing O(1) reset performance with 100,000 alloc+reset cycles  Result: 1588.00 μs for 100,000 alloc+reset cyclesTest 5: Alignment Stress Test  Testing all alignment combinations with random sizes  Result: 2529.00 μs for 64,000 alignment testsTORTURE COMPARISON: Arena vs Malloc under 100K extreme operations  Arena: Consistent O(1) performance regardless of pressure  malloc: Will fragment, slow down, and potentially fail under stress  Arena extreme test:    14671.00 μs  malloc extreme test:   53028.00 μs  ARENA SPEEDUP:         3.61x faster than malloc under extreme stress!EXTREME PERFORMANCE METRICS:  - 67.28 million allocations per second  - 0.0149 μs per allocation (arena system)  - O(1) reset time regardless of allocations made  - Zero fragmentation under any allocation pattern  - Consistent performance under all stress conditions
       
 (DIR) Post #B0kgAU72E8ml7lDRwW by SlicerDicer@friedcheese.us
       2025-11-29T22:42:14.956025Z
       
       0 likes, 0 repeats
       
       @dch Thanks it’s been a long road.
       
 (DIR) Post #B0kgNQig9XQoMkzpxo by SlicerDicer@friedcheese.us
       2025-11-29T22:44:36.168214Z
       
       0 likes, 0 repeats
       
       @dch I should mention this started as a memory manager for C controlled by elixir over nif to make the memory safety immutable to protect the beam vm.
       
 (DIR) Post #B0kgmQhBNbDXWyDWpE by SlicerDicer@friedcheese.us
       2025-11-29T22:49:06.282601Z
       
       0 likes, 0 repeats
       
       @dch It was designing my own transformer engine to run in elixir. It runs in C with cuda, metal and cpu fallback. Platform agnostic. Mac, Linux, FreeBSD. Even hacked in amd and runs on my old Mac Pro with metal from 2010.