Re: NTFS block allocation policy (how does it work?)

From: George M. Garner Jr. (gmgarner_at_newsgroup.nospam)
Date: 02/26/05


Date: Sat, 26 Feb 2005 02:48:33 -0500

Pat,

> If you know at least the approximate size of the file, the best thing to
> do would be to pre-allocate the file, then go back and write to it.<

Could you be more specific as to how to allocate the file. I see the
function SetFileValidData. But that assumes that you already have allocated
the file. Elsewhere I have read that one should not use SetFilePointer(Ex)
because of the added overhead of writing zeros to the file. Is there a way
to allocate the file without incurring the overhead of immediately zeroing
out the clusters. I know the pagefile does this but I do not see an api
that permits it.

Regards,

George.



Relevant Pages

  • Re: State of Forth 200x
    ... run-time overhead ... It's just ALLOCATE and MOVE to copy a small memory region, ... dumb old W32F) in using them. ... IMO objects that are definitely needed ...
    (comp.lang.forth)
  • Re: page sizes
    ... The documentation of malloc() on one of the ... Larger blocks allocate fastest if they are ... overhead by always putting chunks on cacheline boundaries (and wasting ...
    (comp.programming)
  • Re: missing madvise functionality
    ... mmap/mprotect, which have more fundamental locking requirements, more ... overhead and no benefits (except debugging, ... So far, when we allocate a new arena, we allocate address space with ...
    (Linux-Kernel)
  • Re: missing madvise functionality
    ... overhead and no benefits (except debugging, ... core machine. ... So far, when we allocate a new arena, we allocate address space with ...
    (Linux-Kernel)
  • Re: NTFS block allocation policy (how does it work?)
    ... Could you be more specific as to how to allocate the file. ... function SetFileValidData. ... because of the added overhead of writing zeros to the file. ... George. ...
    (microsoft.public.win2000.file_system)