Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differentiate between RAM Slack and File Slack #136

Open
jaredcatkinson opened this issue Feb 8, 2016 · 2 comments
Open

Differentiate between RAM Slack and File Slack #136

jaredcatkinson opened this issue Feb 8, 2016 · 2 comments
Assignees

Comments

@jaredcatkinson
Copy link
Member

RAM Slack is defined as the slack space in the last written sector of a file, while file slack is defined as the unwritten sectors left in a cluster.

@jaredcatkinson
Copy link
Member Author

Not sure if these should be implemented as unique cmdlets or as options on Get-FileSlack.

@jaredcatkinson
Copy link
Member Author

Example, if a NTFS volume has a cluster size of 4096 bytes then all files allocate bytes in 4096 byte chunks. So if a file contains 100 bytes of content, then 4096 bytes will be allocated. In general, Slack Space is the 3996 bytes that are allocated, but not used by the file system.

When differentiating between RAM slack space and file slack space one must consider the size of a sector. Disks must be written to in sector size chunks (typically 512 bytes). RAM slack space is the sectors unused area, so in our example the final 412 bytes of the file's first sector make up the RAM slack. The remaining seven sectors (bytes 512 - 4096) are considered file slack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant