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

Comparing ray/src/common/malloc.c (file contents):
Revision 2.2 by greg, Fri Dec 13 10:28:42 1991 UTC vs.
Revision 2.4 by greg, Sat Feb 8 13:16:01 1992 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1991 Regents of the University of California */
1 > /* Copyright (c) 1992 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 233 | Line 233 | register unsigned  n;
233                  pagesz = amnt = getpagesize();
234                  nrem = (int)sbrk(0);                    /* page align break */
235                  nrem = pagesz - (nrem&(pagesz-1));
236 <                bpos = sbrk(nrem);                      /* word aligned! */
236 >                bpos = sbrk(nrem);
237                  if ((int)bpos == -1)
238                          return(NULL);
239   #ifdef MSTATS
240                  b_nsbrked += nrem;
241   #endif
242 +                bpos += nrem & (BYTES_WORD-1);          /* align pointer */
243 +                nrem &= ~(BYTES_WORD-1);
244          }
245  
246          n = (n+(BYTES_WORD-1))&~(BYTES_WORD-1);         /* word align rqst. */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines