/[pspp]/pspp/src/alloc.c
ViewVC logotype

Diff of /pspp/src/alloc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by blp, Sun Jul 31 21:42:46 2005 UTC revision 1.10 by blp, Wed Oct 26 05:06:14 2005 UTC
# Line 19  Line 19 
19    
20  #include <config.h>  #include <config.h>
21  #include "alloc.h"  #include "alloc.h"
 #include <stdio.h>  
22  #include <stdlib.h>  #include <stdlib.h>
 #include "error.h"  
 #include "str.h"  
23    
24  /* Report an out-of-memory condition and abort execution. */  /* Allocates and returns N elements of S bytes each.
25  void     N must be nonnegative, S must be positive.
26  out_of_memory (void)     Returns a null pointer if the memory cannot be obtained,
27       including the case where N * S overflows the range of size_t. */
28    void *
29    nmalloc (size_t n, size_t s)
30  {  {
31    xalloc_die ();    return !xalloc_oversized (n, s) ? malloc (n * s) : NULL;
32  }  }

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26