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

Comparing ray/src/rt/raypcalls.c (file contents):
Revision 2.39 by greg, Tue Jul 2 23:54:16 2024 UTC vs.
Revision 2.40 by greg, Wed Aug 21 20:42:20 2024 UTC

# Line 158 | Line 158 | static const char      RCSid[] = "$Id$";
158   #endif
159   #endif
160  
161 extern char     *shm_boundary;          /* boundary of shared memory */
162
161   int             ray_pnprocs = 0;        /* number of child processes */
162   int             ray_pnidle = 0;         /* number of idle children */
163  
# Line 388 | Line 386 | ray_pdone(             /* reap children and free data */
386   {
387          ray_pclose(0);                  /* close child processes */
388  
389 <        if (shm_boundary != NULL) {     /* clear shared memory boundary */
392 <                free((void *)shm_boundary);
393 <                shm_boundary = NULL;
394 <        }
389 >        cow_doneshare();                /* clear shared memory boundary */
390  
391          ray_done(freall);               /* free rendering data */
392   }
# Line 459 | Line 454 | ray_popen(                     /* open the specified # processes */
454          if (nobjects <= 0)
455                  error(CONSISTENCY, "ray_popen() called before scene loaded");
456          ambsync();                      /* load any new ambient values */
457 <        if (shm_boundary == NULL) {     /* first child process? */
463 <                preload_objs();         /* preload auxiliary data */
464 <                                        /* set shared memory boundary */
465 <                shm_boundary = (char *)malloc(16);
466 <                strcpy(shm_boundary, "SHM_BOUNDARY");
467 <        }
457 >        cow_memshare();                 /* copy-on-write shared memory */
458          fflush(NULL);                   /* clear pending output */
459          samplestep = ray_pnprocs + nadd;
460          while (nadd--) {                /* fork each new process */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines