Skip to content

Add Windows support #12

Description

@Artoria2e5

Windows has pretty shabby support for fallocate; by that I am saying there is NO distinction between valid vs. allocated space, but Microsoft nevertheless has a SetFileValidData thing that allows for setting valid (therefore occupied) space. Since it leaks raw data on disk, it requires admin privileges, but still it is faster than zero filling and whatnot. (And let's face it, 80% of Windows users use admin privs.)

Aria2 has an example:
https://github.com/aria2/aria2/blob/e0a827f/src/AbstractDiskWriter.cc#L519-L530

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions