NTFS allocation strangeness

T

Tom Del Rosso

This experiment was done under XP Pro on a small 10GB data partition with no
other activity going on. It was almost full with just 4 big files at the
time.

I created a txt file, zero bytes at first. Free space did not change, but
what is strange is that free space still didn't change when it was a
one-byte file.

No space was reportedly allocated until it was greater than 512+32 bytes.

But the next transition was at 4097 bytes where I would have expected.

Why do the first 544 bytes take virtually no space? Explorer and dir were
always in agreement. An NTFS status reporting bug?


no file 132,419,584 bytes free
0 bytes 132,419,584 bytes free
1 bytes 132,419,584 bytes free

544 bytes 132,419,584 bytes free
545 bytes 132,415,488 bytes free

4,096 bytes 132,415,488 bytes free
4,097 bytes 132,411,392 bytes free
 
V

VanguardLH

Tom Del Rosso said:
This experiment was done under XP Pro on a small 10GB data partition with no
other activity going on. It was almost full with just 4 big files at the
time.

I created a txt file, zero bytes at first. Free space did not change, but
what is strange is that free space still didn't change when it was a
one-byte file.

No space was reportedly allocated until it was greater than 512+32 bytes.

But the next transition was at 4097 bytes where I would have expected.

Why do the first 544 bytes take virtually no space? Explorer and dir were
always in agreement. An NTFS status reporting bug?

no file 132,419,584 bytes free
0 bytes 132,419,584 bytes free
1 bytes 132,419,584 bytes free

544 bytes 132,419,584 bytes free
545 bytes 132,415,488 bytes free

4,096 bytes 132,415,488 bytes free
4,097 bytes 132,411,392 bytes free

Guess you don't know that small enough files get stored inside the MFT.
No point wasting further space on the hard disk when the pointer within
the MFT is already large enough to contain the entire file. NTFS allows
storing small files *inside* the file table.

http://msdn.microsoft.com/en-us/library/windows/desktop/aa365230(v=vs.85).aspx
All information about a file, including its size, time and date stamps,
permissions, and data content, is stored either in MFT entries, or in
space outside the MFT that is described by MFT entries.

http://en.wikipedia.org/wiki/NTFS#Resident_vs._non-resident_data_streams
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top