Re: hard drive's page size (if that's the right term)
Re: hard drive's page size (if that's the right term)
- Subject: Re: hard drive's page size (if that's the right term)
- From: email@hidden
- Date: Thu, 11 Nov 2004 12:16:52 -0500
The
physical hard drive block size seems to have been stuck at 512 bytes forever and ever.
However, unless you're doing very low-level unbuffered physical I/O, you probably care more about the allocation block size on an HFS+ volume, which is 4K when you use Apple's utilities to create it.
Thus, when you do an "ls -ls" listing, the first column gives you the number of 512-byte blocks allocated to the file. For normal files, this will be a multiple of 8.
Hope this helps,
John Francini
On Nov 11, 2004, at 9:05 AM, Ben Dougall wrote:
with virtual memory the size of a page is 4k at the moment and the number of bytes in a page can be determined at runtime using getpagesize() from the standard c library. what about the block size of the hard drive -- the smallest size of block that can be read in one go? does that always correspond with the page size? does it vary from drive to drive? is there a getpagesize() hard drive equivalent? if so what is it?
thanks, ben
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden