X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fbuffer.c;h=a6daf3c9b3ae61774c52e09a61f913b211d09b9b;hb=18486cf8d7c2bd54e51fe86016ef0be95320ded2;hp=c0cedc3c8e9fa8be2d293268f944d424f2bdb453;hpb=6c1020d386fefbb6b7c22ff1b25e1ea8fb8951d1;p=chaz%2Ftar diff --git a/src/buffer.c b/src/buffer.c index c0cedc3..a6daf3c 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -44,6 +44,7 @@ static tarlong prev_written; /* bytes written on previous volumes */ static tarlong bytes_written; /* bytes written on this volume */ static void *record_buffer[2]; /* allocated memory */ +union block *record_buffer_aligned[2]; static int record_index; /* FIXME: The following variables should ideally be static to this @@ -369,10 +370,11 @@ xclose (int fd) static void init_buffer () { - if (!record_buffer[record_index]) - page_aligned_alloc (&record_buffer[record_index], record_size); + if (! record_buffer_aligned[record_index]) + record_buffer_aligned[record_index] = + page_aligned_alloc (&record_buffer[record_index], record_size); - record_start = record_buffer[record_index]; + record_start = record_buffer_aligned[record_index]; current_block = record_start; record_end = record_start + blocking_factor; }