Browse Source

(diff_init): Don't use valloc; on older or buggy hosts, you can't
free the result. Use page_aligned_alloc instead.

Paul Eggert 21 years ago
parent
commit
6869d0f6b3
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/compare.c

+ 2 - 3
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,