When viewing details of a file using Finder
, different values are shown for how much space the file occupies. For example, a file takes up 28.8KB of RAM but, 33KB of the disk. Anyone know the explanation?
Asked
Active
Viewed 52 times
0

kgui
- 4,015
- 5
- 41
- 53
-
How are you measuring the RAM usage? – Phillip Mills Jul 17 '15 at 19:09
-
What files are we talking here? Executable? Data? When executables are loaded, not all of it are loaded, there is what you call as resident size and virtual size. For data, it depends on how the file is loaded. When using mmap(), parts of the data file is loaded, not the whole file. When data files are buffered, buffers flush its content before loading the next page. – alvits Jul 17 '15 at 19:15
1 Answers
1
Disk space is allocated in blocks. Meaning, in multiples of a "block size".
For example, on my system a 1 byte
file is 4096 bytes
on disk.
That's 1 byte
of content & 4095 bytes
of unused space.