Skip to main content

Module mmap

Module mmap 

Source

Structs§

ShareableMap
ShareableMap provides a thread-safe memory-mapped file access

Constants§

DIRECT_READ_THRESHOLD
Maximum file size for direct reading (10MB)
MAX_MMAP_SIZE
Maximum file size for single memory mapping (1GB)
MAX_SEGMENTED_MMAP_SIZE
Maximum file size for segmented memory mapping (4GB)
SEGMENT_SIZE
Segment size for large file memory mapping (256MB)

Functions§

process_text_file_parallel
Read a text file in a parallel, line-by-line fashion
read_file_optimized
Read file contents optimally based on file size
read_file_segment
Read a specific segment of a file
read_file_segment_to_string
Read a text file segment as a string
read_file_to_string
Read a text file as a string using the optimal reading strategy