nn::fs::GetRomRequiredMemorySize Function

Syntax

s32 GetRomRequiredMemorySize(
     size_t maxFile,
     size_t maxDirectory,
     bool useCache = true
);

Arguments

Name Description
in maxFile The maximum number of files that can be opened simultaneously.
in maxDirectory The maximum number of directories that can be opened simultaneously.
in useCache Set to true to enable caching of metadata to memory, or false to disable metadata caching.

Return Values

Returns the calculated memory size. If ROM archives cannot be mounted, returns a negative value.

Description

Gets the size of memory needed to mount a ROM archive.

This calculates and returns the memory size needed to mount a ROM archive that accesses a ROMFS generated at build time. The returned memory size allows only the number of files specified by maxFile and the number of directories specified by maxDirectory to be opened simultaneously. If the useCache argument is set equal to true, this size includes the amount of memory required to cache ROMFS metadata.

Revision History

2010/08/16
Initial version.

CONFIDENTIAL