mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
We want the capture format to be usable on systems other than Linux so that it can be used in places like GTK. To do this, we need a sendfile() fallback that can be portable/useful on those systems. FreeBSD has sendfile(), but the semantics differ slightly. This implementation will walk up to the nearest page size and then do page aligned pread()/write() which is likely good enough of an implementation anyway.