Re: File Size Limit Exceeded - How to handle work around this?



I wrote a simple program to continue to create a very large file (on
purpose), and even though there is plenty of disk space on that device
the program aborted with the error message "File Size Limit Exceeded".
The file size was 2147483647. I checked ulimit -a and its set to
unlimited.

Is this a compiler issue? I would like to see a C code example of how
to increase the limit or make it unlimited (if that is a wise thing to
do).

It's been a long time, though, so this advice may be dated.

A long time ago, when the Linux 2.4 kernel was new (i.e., when 64-bit
file sizes were just starting to catch on), we used to have this same
problem. Back then, you had to compile with some special symbol
defined, LARGE_FILES or something like that. That caused the typical
file size types (offset_t and the like) to be 64 bit. You might find
something like that in the compiler documentation.

Of course, to narrow it to OS or C, you could have your program write
to stdout and redirect to a file. If it still doesn't work, you have
an OS problem. And if it isn't C, it could be your OS kernel, or your
shell, or your filesystem (e.g., NFS) that has some kind of limit in
it.

Michael

.



Relevant Pages

  • Re: Migration to linux-2.6.8 from linux-2.4.26
    ... > Error message would be nice to have. ... Kernel requires old lsmod but couldn't run ./lsmod.old No such ... > compiler version and platform info. ... Therefore my root file-system (on a SCSI disk) ...
    (Linux-Kernel)
  • Re: [patch 2.4.33-rc1] updated patch kit for gcc-4.1.1
    ... Merged the fixes for gcc-4.1 into the baseline patch kit for gcc-4.0. ... - The architectures known to work in kernel 2.4.33-rc1 + this patch kit ... compiler automatically upgraded to 4.0. ... there's a clear error message now. ...
    (Linux-Kernel)
  • amd64 bitops fix for -Os
    ... filesystem, the kernel mostly hangs. ... When optimizing for speed, the generated code is such that the flags ... Obviously the asm statement must not rely on the compiler setting up ... -inline long find_first_zero_bit(const unsigned long * addr, ...
    (Linux-Kernel)
  • Re: amd64 bitops fix for -Os
    ... > kernel build. ... because its inline asm assumes at least one iteration ... the generated code is such that the flags ... although in a perfect world the compiler would be ...
    (Linux-Kernel)
  • Newbie Q: spca5xx webcam driver installation problem
    ... with the included default makefile. ... Building SPCA5XX driver for 2.5/2.6 kernel. ... # Setup the tools ... # Setup compiler warnings ...
    (comp.os.linux.setup)