flat assembler
Message board for the users of flat assembler.
Index
> Windows > Open file, read by char and count a specyfic char Goto page Previous 1, 2 |
Author |
|
baldr 23 Jan 2014, 09:44
Windows internally uses memory mapping extensively, so it rarely reads less than page at once (hence default cluster size for NTFS is 4 KiB since NT 4). Reading entire file for sequential access is an overkill, too many pages will be committed — gaining nothing. You may hint CreateFile with FILE_FLAG_SEQUENTIAL_SCAN flag; heh, caching may be disabled entirely using FILE_FLAG_NO_BUFFERING, though restrictions apply.
Anyway, guesswork is futile: there is "Windows Internals" book by Mark, David and Alex, containing most, if not all, nitty-gritty details about I/O system, memory and cache managers. A 'must read' for a serious Windows programmer, I should say. P.S. AsmGuru62, you're probably right, that overhead of sanity checks may be quite big. |
|||
23 Jan 2014, 09:44 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.