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

Comparing ray/src/common/bmalloc.c (file contents):
Revision 2.4 by greg, Tue Feb 25 02:47:21 2003 UTC vs.
Revision 2.6 by schorsch, Fri Nov 14 17:22:06 2003 UTC

# Line 15 | Line 15 | static const char      RCSid[] = "$Id$";
15  
16   #include <stdlib.h>
17  
18 + #include "rtmisc.h"
19 +
20   #ifndef  MBLKSIZ
21   #define  MBLKSIZ        16376           /* size of memory allocation block */
22   #endif
# Line 29 | Line 31 | static unsigned int  nremain = 0;
31  
32  
33   char *
34 < bmalloc(n)              /* allocate a block of n bytes */
35 < register unsigned int  n;
34 > bmalloc(                /* allocate a block of n bytes */
35 > register unsigned int  n
36 > )
37   {
38          if (n > nremain && (n > MBLKSIZ || nremain > MBLKSIZ/WASTEFRAC))
39                  return(malloc(n));                      /* too big */
# Line 48 | Line 51 | register unsigned int  n;
51  
52  
53   void
54 < bfree(p, n)                     /* free random memory */
55 < register char   *p;
56 < register unsigned int   n;
54 > bfree(                  /* free random memory */
55 > register char   *p,
56 > register unsigned int   n
57 > )
58   {
59          register unsigned int   bsiz;
60                                          /* check alignment */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines