User: Password:
|
|
Subscribe / Log in / New account

example typos

example typos

Posted Oct 23, 2009 21:06 UTC (Fri) by bfields (subscriber, #19510)
Parent article: File holes, races, and mmap()

pwrite(fd, buf, 1, 10000);
...
Note that even though the file size is set to 1000 bytes

Was the fourth argument to pwrite() intended to be 1000, not 10000? (After which the file size should be 1001 bytes, not 1000.)


(Log in to post comments)

example typos

Posted Oct 26, 2009 17:43 UTC (Mon) by jan.kara (subscriber, #59161) [Link]

No, the argument should really be 10000. But the sentence below the example is confusing (and has a typo). It should be something like:
Note that 4096 bytes of the file are mapped (even though the file size at the time of mmap was 1024 bytes) because files are mapped in page-sized chunks.

example typos

Posted Oct 26, 2009 23:26 UTC (Mon) by goldwynr (subscriber, #55322) [Link]

Yes, thats right. Correct the article now. Thanks!


Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds