A strange div bug on Linux x86_64, (both dmd & ldc2): long -5000 / size_t 2 = 9223372036854773308

Walter Bright newshound2 at digitalmars.com
Thu Aug 13 21:43:24 UTC 2020


On 8/13/2020 12:11 PM, mw wrote:
> But for practical purpose: half that space is large/good enough, 2^63 = 
> 9,223,372,036,854,775,808, you sure your machine have that much memory 
> installed? (very roughly, 9G of GB?)

Now think about 32 bit address spaces, where arrays larger than 2Gb do happen.

For example, I noticed that many 32 bit programs that operated on files, such as 
compressors, would corrupt files and do mysterious ugly things when given files 
larger than 2Gb.



More information about the Digitalmars-d mailing list