Skip to content

Add MMapAllocator for SSD-backed memory-mapped data allocation#302

Draft
ibhati wants to merge 1 commit intomainfrom
ib/ssd
Draft

Add MMapAllocator for SSD-backed memory-mapped data allocation#302
ibhati wants to merge 1 commit intomainfrom
ib/ssd

Conversation

@ibhati
Copy link
Member

@ibhati ibhati commented Mar 25, 2026

Add MMapAllocator that allocates memory via mmap-backed files on a configurable path (e.g. NVMe/SSD). This enables placing secondary data structures on SSD while keeping primary data in RAM, reducing heap memory usage for large-scale vector search.

  • include/svs/core/allocator_mmap.h: MMapAllocator with configurable base path, access hints (Sequential/Random/Normal), and automatic file cleanup on deallocation.
  • tests/svs/core/test_allocator_mmap.cpp: Unit tests for allocation, deallocation, file creation, and access hint propagation.
  • tests/CMakeLists.txt: Register mmap allocator test.

Add MMapAllocator that allocates memory via mmap-backed files on a
configurable path (e.g. NVMe/SSD). This enables placing secondary
data structures on SSD while keeping primary data in RAM, reducing
heap memory usage for large-scale vector search.

- include/svs/core/allocator_mmap.h: MMapAllocator with configurable
  base path, access hints (Sequential/Random/Normal), and automatic
  file cleanup on deallocation.
- tests/svs/core/test_allocator_mmap.cpp: Unit tests for allocation,
  deallocation, file creation, and access hint propagation.
- tests/CMakeLists.txt: Register mmap allocator test.
@ibhati ibhati requested review from razdoburdin and rfsaliev and removed request for razdoburdin and rfsaliev March 25, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant