What are the typical RAM requirements of the TargetFAT file system?
TargetFAT’s RAM footprint includes two arrays whose size is determined at compile-time. The Files Array holds the file control blocks used by open files and is shared by all TargetOS file systems (TargetFFS, TargetRFS, etc.) present in the build. Its size in bytes is: (FOPEN_MAX + 1) * sizeof(FILE) = (FOPEN_MAX + 1) * (64 + FILENAME_MAX) The FatGlob Array has one entry for each volume that may be added to TargetFAT. Its size in bytes is: NUM_FAT_VOLS * sizeof(FatGlob) = NUM_FAT_VOLS * (244 + FILENAME_MAX) The above symbols are defined in “posix.h”. The effective size of FILENAME_MAX is rounded up to a multiple of 4 bytes. TargetFAT also allocates memory at run-time. The Fat->num_clusts and Fat->sects_per_fat values used below are only determined when a volume is mounted. Their values can be read via the vstat() call. The notation “Fat->” represents a pointer to a specific volume’s FatGlob entry.