4MByte limit in IMFS for each file?

Joel Sherrill joel.sherrill at OARcorp.com
Sun Feb 23 20:54:24 UTC 2003

Thomas Doerfler wrote:
> Hello,
> it's me again :-)
> When I tried out my "fileio" sample, I hit a strange 4MByte
> limit when creating files in the IMFS. I was working on a
> PC386 target with 16MByte of memory (and most of it was always
> available on the heap).
> When I tried to create big files (like 8MB), the write call
> always failed (with a "no space left on device" error),
> directly after reaching a 4MByte file size boundary.
> This limit does not exist on the DOSFS, only when writing to
> the IMFS. I tried it out on a MBX8xx system (with 16MByte of
> RAM) and there I hit the limit also after 4MBytes.
> I was browsing through the IMFS sources and did not find any
> reason for this limitation, and I did not yet run the test
> with a debugger.
> Any hints on that issue?

There is a limit on the number of blocks and the size of each
block is settable in a header file.  See
IMFS_MEMFILE_BYTES_PER_BLOCK and up it from 128 to something
larger.  256 will double the maximum file size.

> wkr,
>         Thomas.
> --------------------------------------------
> IMD Ingenieurbuero fuer Microcomputertechnik
> Thomas Doerfler           Herbststrasse 8
> D-82178 Puchheim          Germany
> email:    Thomas.Doerfler at imd-systems.de
> PGP public key available at: http://www.imd-
> systems.de/pgp_keys.htm

Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985

More information about the users mailing list