aboutsummaryrefslogtreecommitdiff
path: root/libbb/copyfd.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/copyfd.c')
-rw-r--r--libbb/copyfd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libbb/copyfd.c b/libbb/copyfd.c
index ed383ae28..08bc6f8df 100644
--- a/libbb/copyfd.c
+++ b/libbb/copyfd.c
@@ -22,6 +22,8 @@ static off_t bb_full_fd_action(int src_fd, int dst_fd, off_t size)
char *buffer;
int buffer_size;
+ /* We want page-aligned buffer, just in case kernel is clever
+ * and can do page-aligned io more efficiently */
buffer = mmap(NULL, CONFIG_FEATURE_COPYBUF_KB * 1024,
PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANON,