Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
MappedFile.hpp File Reference

Cross-platform memory-mapped file I/O utility. More...

#include <cstddef>
#include <cstdint>
#include <stdexcept>
#include <string>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
Include dependency graph for MappedFile.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  correlation::core::MappedFile
 RAII memory-mapped read-only file view. More...

Namespaces

namespace  correlation
namespace  correlation::core

Variables

constexpr std::uint64_t correlation::core::K_MAX_TRAJECTORY_BYTES
 Maximum trajectory file size (4 GiB).

Detailed Description

Cross-platform memory-mapped file I/O utility.

License
SPDX-License-Identifier: AGPL-3.0-only

Provides a lightweight RAII wrapper around OS-level memory mapping:

  • Windows: CreateFileMapping / MapViewOfFile
  • POSIX: mmap / munmap

The mapped region is read-only and immutable after construction.