[llvm-dev] lld: sigbus error handling

Rui Ueyama via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 31 11:02:08 PDT 2017


Does FreeBSD have fallocate(2) or equivalent?

On Mon, Oct 30, 2017 at 4:32 PM, Ed Maste <emaste at freebsd.org> wrote:

> On 23 October 2017 at 18:49, Rui Ueyama via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> >>
> >> BTW, posix_fallocate() might provide better portability and decrease the
> >> likelihood of falling back on ftruncate().
> >
> > Yes, but we want to avoid that function because when it falls back, it is
> > very slow. What it does when fallocate(2) is not available is to actually
> > write 0 to every block to make sure that all disk blocks are allocated.
>
> Note that posix_fallocate may return EINVAL if the underlying
> filesystem does not support the operation.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171031/5c474aab/attachment.html>


More information about the llvm-dev mailing list