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

Comparing ray/src/rt/rcontrib.c (file contents):
Revision 2.43 by greg, Wed Nov 15 18:02:53 2023 UTC vs.
Revision 2.45 by greg, Wed Aug 21 20:42:20 2024 UTC

# Line 12 | Line 12 | static const char RCSid[] = "$Id$";
12   #include "otypes.h"
13   #include "source.h"
14  
15 char    *shm_boundary = NULL;           /* boundary of shared memory */
16
15   CUBE    thescene;                       /* our scene */
16   OBJECT  nsceneobjs;                     /* number of objects in our scene */
17  
# Line 68 | Line 66 | RNUMBER        lastdone = 0;                   /* last ray output */
66  
67   static void     trace_contrib(RAY *r);  /* our trace callback */
68  
69 < static void mcfree(void *p) { epfree((*(MODCONT *)p).binv); free(p); }
69 > static void mcfree(void *p) { epfree((*(MODCONT *)p).binv,1); free(p); }
70  
71   LUTAB   modconttab = LU_SINIT(NULL,mcfree);     /* modifier lookup table */
72  
# Line 226 | Line 224 | rcinit(void)
224          if (nproc > MAXPROCESS)
225                  sprintf(errmsg, "too many processes requested -- reducing to %d",
226                                  nproc = MAXPROCESS);
227 <        if (nproc > 1) {
228 <                preload_objs();         /* preload auxiliary data */
231 <                                        /* set shared memory boundary */
232 <                shm_boundary = strcpy((char *)malloc(16), "SHM_BOUNDARY");
233 <        }
227 >        if (nproc > 1)
228 >                cow_memshare();         /* preload auxiliary data */
229          trace = trace_contrib;          /* set up trace call-back */
230          for (i = 0; i < nsources; i++)  /* tracing to sources as well */
231                  source[i].sflags |= SFOLLOW;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines