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: Recursive subroutine for reading null-terminated string
    ... and any other call overhead. ... I thought that normal arrays are allocated a single ... and just before the ALLOCATE. ... for recursion up to that point. ...
    (comp.lang.fortran)
  • 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[2]: [PATCH][v2] fork_init: fix division by zero
    ... overhead before this patch: e.g. your implementation is finally boils ... common situation of small PAGE_SIZEs. ... can't allocate thread structs from highmem. ... Emcraft Systems, www.emcraft.com ...
    (Linux-Kernel)
  • 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)

Loading