[Issue 11791] std.file.write failed to write huge files

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Mar 22 14:57:21 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=11791

b2.temp at gmx.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |b2.temp at gmx.com
         Resolution|---                         |INVALID

--- Comment #6 from b2.temp at gmx.com ---
This is a known limitation of the write function.

see http://man7.org/linux/man-pages/man2/write.2.html

> on Linux, write() (and similar system calls) will transfer at most
> 0x7ffff000 (2,147,479,552) bytes, returning the number of bytes
> actually transferred.  (This is true on both 32-bit and 64-bit
> systems.)

If you want to write more you must use a stream and write several buffers or
use append (). std.stdio.File works because it doesn't bulk-write.

--


More information about the Digitalmars-d-bugs mailing list