Quantcast
Channel: Recent posts
Viewing all articles
Browse latest Browse all 31

Big binary writes

$
0
0
Englisch

Consider output to a file opened as binary. Such a file is just a stream of bytes, containingno internal structure (specifically, no "records"). If we make the integer 'huge' sufficiently large, then


dimension a(huge)


write (unit) a(:)


generates a stack overflow, though


write (unit) a


does not. Apparently, the first form builds an intermediate array on the stack and then writes the itermediate array, while the second just writes the array directly. Maybe.


Viewing all articles
Browse latest Browse all 31


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>