--- id: smmap version: "5.0.3" license: BSD-3-Clause license_treatment: permissive maintenance: abandoned --- # smmap — A pure Python implementation of a sliding window memory map manager License: permissive · Maintenance: abandoned · Popularity: top 1,000 on PyPI ## Install pip install smmap uv add smmap poetry add smmap ## Description ## Motivation When reading from many possibly large files in a fashion similar to random access, it is usually the fastest and most efficient to use memory maps. Although memory maps have many advantages, they represent a very limited system resource as every map uses one file descriptor, whose amount is limited per process. On 32 bit systems, the amount of memory you can have mapped at a time is naturally limited to theoretical 4GB of memory, which may not be enough for some applications. ## Limitations * **System resources (file-handles) are likely to be leaked!** This is due to the library authors reliance on a deterministic `__del__()` destructor. * The memory access is read-only by design. ## Overview ![Python package](https://github.com/gitpython-developers/smmap/workflows/Python%20package/badge.svg) Smmap wraps an interface around mmap and tracks the mapped files as well as the amount of clients who use it. If the system runs out of resources, or if a memory limit is reached, it will automatically unload unused maps to allow continued operation. To allow processing large files even on 32 bit systems, it allows only portions of the file to be mapped. Once the... ## AI interpretation — verify before relying Smmap provides a sliding-window memory map manager that automatically handles file mapping and unmapping across system resource limits, allowing efficient random access to large files even on 32-bit systems by mapping only needed portions on demand. Verdict: Smmap is a stable, dependency-free memory mapping utility suitable for efficient large-file access, but its abandoned repository status and documented resource-leak risk via __del__() should weigh heavily in production decisions. Use only if the read-only, auto-mapping semantics fit your workload and you can tolerate potential file descriptor leaks. [View on SkillFed](https://skillfed.io/packages/smmap) · [View on PyPI](https://pypi.org/project/smmap/)