skillfed

omnimalloc

Your one-stop shop for static memory allocation.

omnimalloc v1.0.0 91.3K downloads/30d#13,524 on PyPI4
Permissive license Apache-2.0 Active released

What it is and what it does

OmniMalloc is a Python library that solves the static memory allocation problem: given a set of buffers with known sizes and lifetimes, it computes optimal offsets so that peak memory usage is minimized. This is a core step in ML compilers, embedded runtimes, and accelerator toolchains. The library wraps a C++ backend and exposes multiple allocation algorithms—including SuperMalloc, a new allocator claimed to outperform open-source alternatives—behind a single Python API.

You define allocations with size and lifetime intervals (half-open ranges where lifetimes that touch never conflict), then call allocate() with your choice of allocator strategy. The library returns a plan with assigned offsets for each buffer. It also ships benchmark harness and visualization tools to evaluate allocation strategies on real workloads.

Use it for:

  • Optimize memory layout for ML model inference on embedded or accelerator devices with fixed memory budgets.
  • Plan static buffer allocation for neural network compilation pipelines to reduce peak memory footprint.
  • Benchmark and compare different allocation strategies on real workloads using the built-in harness.
  • Develop and prototype new allocation algorithms using the library's framework and visualization tools.
  • Pack multiple buffers with non-overlapping lifetimes into shared memory pools for resource-constrained environments.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

OmniMalloc solves static memory allocation for neural networks by assigning buffer offsets to minimize peak memory usage, with an efficient C++ backend and multiple allocation algorithms including SuperMalloc.

Yes, if you are building ML compilers, embedded runtimes, or accelerator toolchains that need to optimize static memory allocation. The library is actively maintained, has no known vulnerabilities, supports current Python versions (3.10–3.14), and offers both a practical allocator (SuperMalloc) and a framework for developing new strategies. Install friction is moderate due to compiled wheels, but pre-built binaries are available for common platforms. Not relevant for general Python development.

Install

omnimalloc on PyPI

pip

pip install omnimalloc

uv

uv add omnimalloc

poetry

poetry add omnimalloc

Installing omnimalloc

Before you install

Medium install friction due to compiled wheels for multiple Python versions (3.10–3.14) and platforms, but wheels are pre-built for common architectures. Active maintenance with a release 2 days old and last commit on 2026-08-13.

License in practice

Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions; attribution required.

Quickstart

pip install omnimalloc

import omnimalloc as om

pool = om.Pool(
    id="pool",
    allocations=(
        om.Allocation(id=0, size=64, start=0, end=10),
        om.Allocation(id=1, size=64, start=12, end=20),
        om.Allocation(id=2, size=32, start=5, end=15),
    ),
)
pool = om.allocate(pool, allocator="supermalloc", validate=True)
print(pool.size)

Requires Python 3.10 or later; compiled wheels available for macOS (ARM64), Linux (x86_64, aarch64), and Windows (amd64).

Verify before relying

  • Whether SuperMalloc's performance advantage holds across all workload types or only specific ML compiler scenarios.
  • API stability and backward compatibility guarantees for future releases beyond 1.0.0.
  • Detailed memory overhead of the allocator itself relative to peak savings achieved.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction medium — platform-specific wheel
Runtime dependencies 1 — typing-extensions
Maintenance actively maintained — 2 days since the last release
Last repo commit
First released
Downloads 91,315/month — #13,524 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: omnimalloc-1.0.0-cp310-cp310-macosx_11_0_arm64.whl; omnimalloc-1.0.0-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; omnimalloc-1.0.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; omnimalloc-1.0.0-cp310-cp310-win_amd64.whl; omnimalloc-1.0.0-cp311-cp311-macosx_11_0_arm64.whl; omnimalloc-1.0.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; omnimalloc-1.0.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; omnimalloc-1.0.0-cp311-cp311-win_amd64.whl; omnimalloc-1.0.0-cp312-cp312-macosx_11_0_arm64.whl; omnimalloc-1.0.0-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; omnimalloc-1.0.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; omnimalloc-1.0.0-cp312-cp312-win_amd64.whl; omnimalloc-1.0.0-cp313-cp313-macosx_11_0_arm64.whl; omnimalloc-1.0.0-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; omnimalloc-1.0.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; omnimalloc-1.0.0-cp313-cp313-win_amd64.whl; omnimalloc-1.0.0-cp314-cp314-macosx_11_0_arm64.whl; omnimalloc-1.0.0-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; omnimalloc-1.0.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; omnimalloc-1.0.0-cp314-cp314-win_amd64.whl

Keywords: memory, allocation, allocator, static-allocation

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchOperating System :: OS IndependentProgramming Language :: C++Programming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/EngineeringTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

static memory allocation neural networksbuffer offset optimizationpeak memory minimizationml compiler memory planningallocator algorithmsmemory layout optimization
memory-optimizationml-compilerstatic-allocation

More Scientific/Engineering packages