https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115008
Nathaniel Shead <nshead at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |nshead at gcc dot
gnu.org
Status|NEW |ASSIGNED
--- Comment #7 from Nathaniel Shead <nshead at gcc dot gnu.org> ---
Created attachment 59938
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59938&action=edit
proposed fix
Thanks! Apparently on some systems the use of posix_fallocate can be
noticeably faster than ftruncate for large files, so I think it's possibly
worth it to keep using it. Though from a quick test on my system the use of
ftruncate vs. posix_fallocate didn't seem to have any noticeable impact on
performance for a large module testcase (albeit with a debug GCC build) so
maybe this additional complexity isn't worth it.
Nevertheless, here's a potential fix; quickly tested on x86_64-pc-linux-gnu,
let me know if it works for you and I'll post it as a patch (after a more
thorough test on my end as well).