From: Paul Eggert Date: Tue, 3 Aug 2004 04:44:13 +0000 (+0000) Subject: (diff_init): Don't use valloc; on older or buggy hosts, you can't X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=6869d0f6b38a0cef2f04ad1792ce5ff61e314b15;p=chaz%2Ftar (diff_init): Don't use valloc; on older or buggy hosts, you can't free the result. Use page_aligned_alloc instead. --- diff --git a/src/compare.c b/src/compare.c index ba120be..ebcb8c2 100644 --- a/src/compare.c +++ b/src/compare.c @@ -54,9 +54,8 @@ static char *diff_buffer; void diff_init (void) { - diff_buffer = valloc (record_size); - if (!diff_buffer) - xalloc_die (); + void *ptr; + diff_buffer = page_aligned_alloc (&ptr, record_size); } /* Sigh about something that differs by writing a MESSAGE to stdlis,