This class represents a memory mapped file. It is based on boost::iostreams::mapped_file.

Synopsis

Declared in <llvm/Support/FileSystem.h>

class mapped_file_region;

Enums

Name

Description

mapmode

Access mode for a mapped file region.

Member Functions

Name

Description

mapped_file_region [constructor]

Constructors

~mapped_file_region [destructor]

Unmap the region on destruction.

operator=

Assignment operators

const_data

Get a const view of the data. Modifying this memory has undefined behavior.

data

Return a mutable pointer to the start of the mapped region.

dontNeed

Advise the OS that the mapped pages will not be needed soon.

randomAccess

Advise that access to the mapping will be random.

size

Return the size in bytes of the mapped region.

sync

Write changes to disk and synchronize. Equivalent to POSIX msync. This will wait for flushing memory‐mapped region back to disk and can be very slow.

unmap

Unmap.

willNeed

Advise that the mapped pages will be needed soon.

operator bool

Check if this is a valid mapping.

Static Member Functions

Name

Description

alignment

Return the minimum alignment required for mapped offsets.

Created with MrDocs