ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/meta/palloc.c
(Generate patch)

Comparing ray/src/meta/palloc.c (file contents):
Revision 1.2 by schorsch, Sun Jun 8 12:03:10 2003 UTC vs.
Revision 1.3 by schorsch, Mon Jul 21 22:30:18 2003 UTC

# Line 25 | Line 25 | PRIMITIVE *
25   palloc(void)            /* allocate a primitive */
26  
27   {
28 < register PRIMITIVE  *p;
28 >    register PRIMITIVE  *p;
29  
30 < if (maxalloc > 0 && nalloc >= maxalloc)
31 <    return(NULL);
30 >    if (maxalloc > 0 && nalloc >= maxalloc)
31 >        return(NULL);
32  
33 < if ((p = pop(&freelist)) == NULL)
34 <    if (morefree())
35 <       p = pop(&freelist);
36 <    else {
37 <       sprintf(errmsg, "out of memory in palloc (nalloc = %d)", nalloc);
38 <       error(SYSTEM, errmsg);
39 <       }
33 >    if ((p = pop(&freelist)) == NULL) {
34 >        if (morefree())
35 >            p = pop(&freelist);
36 >        else {
37 >            sprintf(errmsg, "out of memory in palloc (nalloc = %d)", nalloc);
38 >            error(SYSTEM, errmsg);
39 >        }
40 >    }
41  
42 < nalloc++;
43 < return(p);
42 >    nalloc++;
43 >    return(p);
44   }
45  
46  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines