{"id":45655,"library":"omnimalloc","title":"Omnimalloc","description":"A Python library providing static memory allocation with a unified interface. It supports arena-based allocation, stack allocators, and pool allocators for performance-critical or embedded contexts. Current version is 0.3.0, updated April 2025. Active development with infrequent releases.","status":"active","version":"0.3.0","language":"python","source_language":"en","source_url":"https://github.com/fpedd/omnimalloc","tags":["memory-allocation","arena-allocator","static-allocation","embedded"],"install":[{"cmd":"pip install omnimalloc","lang":"bash","label":"Default install"}],"dependencies":[{"reason":"Required for some allocator backends (e.g., memory-mapped arrays)","package":"numpy","optional":true}],"imports":[{"wrong":"from omnimalloc import Arena","symbol":"Allocation","correct":"from omnimalloc import Allocation"},{"symbol":"allocate","correct":"from omnimalloc import allocate"},{"symbol":"Pool","correct":"from omnimalloc import Pool"}],"quickstart":{"code":"from omnimalloc import Arena\n\n# Allocate a 1KB arena\narena = Arena(1024)\nstats = arena.stats()\nprint(f\"Capacity: {stats.capacity}, Used: {stats.used}\")\n# Clean up\narena.free()","lang":"python","description":"Basic usage: create a static memory arena, inspect stats, and free it."},"warnings":[{"fix":"Use context managers: `with Arena(1024) as arena:` (available from 0.2.0+).","message":"Arena.free() must be called manually; there is no automatic garbage collection. Forgetting to call free() causes memory leaks.","severity":"gotcha","affected_versions":"all"},{"fix":"Update imports to `from omnimalloc import Arena, StackAllocator, PoolAllocator`.","message":"In 0.2.0, all allocator classes moved from `omnimalloc.allocators.*` to `omnimalloc`. Old imports will break.","severity":"breaking","affected_versions":"0.1.x to 0.2.0"},{"fix":"Replace `from omnimalloc.mmap import MmapArena` with `Arena(size, backed='mmap')`.","message":"The `omnimalloc.mmap` module (memory-mapped arenas) is deprecated and will be removed in 0.4.0. Use `Arena` with `backed='mmap'` instead.","severity":"deprecated","affected_versions":">=0.2.0"},{"fix":"Use `omnimalloc.ThreadSafeArena` wrapper or external locking.","message":"Arena objects are not thread-safe by default. Concurrent allocations from multiple threads can corrupt internal state.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.3.0':34 '2025':37 'activ':38 'alloc':8,18,20,23,45,48,51 'april':36 'arena':16,47 'arena-alloc':46 'arena-bas':15 'base':17 'context':30 'critic':27 'current':31 'develop':39 'embed':29,52 'infrequ':41 'interfac':12 'librari':4 'memori':7,44 'memory-alloc':43 'omnimalloc':1 'perform':26 'performance-crit':25 'pool':22 'provid':5 'python':3 'releas':42 'stack':19 'static':6,50 'static-alloc':49 'support':14 'unifi':11 'updat':35 'version':32","created_at":"2026-06-07T12:56:04.783375+00:00","updated_at":"2026-06-07T12:56:04.783375+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/fpedd/omnimalloc","github":"https://github.com/fpedd/omnimalloc","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}