omnimalloc
Your one-stop shop for static memory allocation.
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 omnimallocuv
uv add omnimallocpoetry
poetry add omnimallocInstalling 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
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
umfUMF is a library for constructing and managing…
permissive · top 15,000 on PyPI
mnnMNN is a lightweight deep learning inference…
permissive · top 15,000 on PyPI
HLLEstimates the cardinality (unique count) of…
permissive · top 15,000 on PyPI
comfy-aimdoA PyTorch VRAM allocator that dynamically…
unclear · top 5,000 on PyPI
rmm-cu12RMM provides a common interface for customizing…
permissive · top 15,000 on PyPI
lion-pytorchLion is a PyTorch optimizer that implements an…
permissive · top 15,000 on PyPI
librmm-cu12librmm-cu12 provides GPU memory allocation and…
permissive · top 15,000 on PyPI
onnx-toolParse, analyze, optimize, and profile ONNX…
permissive · top 15,000 on PyPI
sgl-kernelsgl-kernel provides optimized CUDA compute…
permissive · top 15,000 on PyPI
pytest-memrayA pytest plugin that integrates memray memory…
permissive · top 5,000 on PyPI