Pre‐allocate a range of a file so later writes into it do not fragment or fail.

Synopsis

Declared in <util/fs_helpers.h>

void
AllocateFileRange(
    FILE* file,
    unsigned int offset,
    unsigned int length);

Parameters

Name

Description

file [in]

The open file to extend.

offset [in]

The starting byte offset of the range to allocate.

length [in]

The number of bytes to allocate from the offset.

Created with MrDocs