ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/Development/ray/src/rt/RcontribSimulManager.cpp
(Generate patch)

Comparing ray/src/rt/RcontribSimulManager.cpp (file contents):
Revision 2.20 by greg, Sat Oct 25 18:01:23 2025 UTC vs.
Revision 2.21 by greg, Mon Oct 27 18:38:32 2025 UTC

# Line 125 | Line 125 | fileDataShare(const char *name, RCOutputOp op, size_t
125                  error(SYSTEM, errmsg);
126                  return NULL;
127          }
128 <        return new RdataShareFile(name, RSDOflags[op], siz);
128 >        RdataShare *    rds = new RdataShareFile(name, RSDOflags[op],
129 >                                                 siz*(op != RCOforce));
130 >                                                
131 >        if (!rds || (op == RCOforce && rds->Resize(siz) < siz)) {
132 >                delete rds;
133 >                sprintf(errmsg, "cannot create %lu byte output file '%s'",
134 >                                        (unsigned long)siz, name);
135 >                error(SYSTEM, errmsg);
136 >                return NULL;
137 >        }
138 >        return rds;
139   }
140  
141   // Memory-mapped data share function
# Line 137 | Line 147 | mapDataShare(const char *name, RCOutputOp op, size_t s
147                  error(SYSTEM, errmsg);
148                  return NULL;
149          }
150 <        return new RdataShareMap(name, RSDOflags[op], siz);
150 >        RdataShare *    rds = new RdataShareMap(name, RSDOflags[op],
151 >                                                 siz*(op != RCOforce));
152 >
153 >        if (!rds || (op == RCOforce && rds->Resize(siz) < siz)) {
154 >                delete rds;
155 >                sprintf(errmsg, "cannot create %lu byte output map '%s'",
156 >                                        (unsigned long)siz, name);
157 >                error(SYSTEM, errmsg);
158 >                return NULL;
159 >        }
160 >        return rds;
161   }
162  
163   // Set output format ('f', 'd', or 'c')

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)