Skip to content

Commit 348d677

Browse files
committed
Reduce memory footprint of test occasionally being killed on Travis
The test previously required 2.6GB of memory to complete, and was sometimes getting killed (seemingly only in the CMake configuration, though). Reducing the number of variables to 180 reduces the memory footprint to 1.3GB, which should address the problem.
1 parent 774060b commit 348d677

File tree

2 files changed

+2
-154
lines changed

2 files changed

+2
-154
lines changed
Binary file not shown.

jbmc/regression/jbmc/lots_of_local_variables/TooManyLocals.java

Lines changed: 2 additions & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
public class TooManyLocals {
22
public static void test() {
3-
int [] allInts = new int[256];
3+
int [] allInts = new int[180];
44
int i0 = 0;
55
int i1 = 1;
66
int i2 = 2;
@@ -181,82 +181,6 @@ public static void test() {
181181
int i177 = 177;
182182
int i178 = 178;
183183
int i179 = 179;
184-
int i180 = 180;
185-
int i181 = 181;
186-
int i182 = 182;
187-
int i183 = 183;
188-
int i184 = 184;
189-
int i185 = 185;
190-
int i186 = 186;
191-
int i187 = 187;
192-
int i188 = 188;
193-
int i189 = 189;
194-
int i190 = 190;
195-
int i191 = 191;
196-
int i192 = 192;
197-
int i193 = 193;
198-
int i194 = 194;
199-
int i195 = 195;
200-
int i196 = 196;
201-
int i197 = 197;
202-
int i198 = 198;
203-
int i199 = 199;
204-
int i200 = 200;
205-
int i201 = 201;
206-
int i202 = 202;
207-
int i203 = 203;
208-
int i204 = 204;
209-
int i205 = 205;
210-
int i206 = 206;
211-
int i207 = 207;
212-
int i208 = 208;
213-
int i209 = 209;
214-
int i210 = 210;
215-
int i211 = 211;
216-
int i212 = 212;
217-
int i213 = 213;
218-
int i214 = 214;
219-
int i215 = 215;
220-
int i216 = 216;
221-
int i217 = 217;
222-
int i218 = 218;
223-
int i219 = 219;
224-
int i220 = 220;
225-
int i221 = 221;
226-
int i222 = 222;
227-
int i223 = 223;
228-
int i224 = 224;
229-
int i225 = 225;
230-
int i226 = 226;
231-
int i227 = 227;
232-
int i228 = 228;
233-
int i229 = 229;
234-
int i230 = 230;
235-
int i231 = 231;
236-
int i232 = 232;
237-
int i233 = 233;
238-
int i234 = 234;
239-
int i235 = 235;
240-
int i236 = 236;
241-
int i237 = 237;
242-
int i238 = 238;
243-
int i239 = 239;
244-
int i240 = 240;
245-
int i241 = 241;
246-
int i242 = 242;
247-
int i243 = 243;
248-
int i244 = 244;
249-
int i245 = 245;
250-
int i246 = 246;
251-
int i247 = 247;
252-
int i248 = 248;
253-
int i249 = 249;
254-
int i250 = 250;
255-
int i251 = 251;
256-
int i252 = 252;
257-
int i253 = 253;
258-
int i254 = 254;
259-
int i255 = 255;
260184
allInts[0] = i0;
261185
allInts[1] = i1;
262186
allInts[2] = i2;
@@ -437,82 +361,6 @@ public static void test() {
437361
allInts[177] = i177;
438362
allInts[178] = i178;
439363
allInts[179] = i179;
440-
allInts[180] = i180;
441-
allInts[181] = i181;
442-
allInts[182] = i182;
443-
allInts[183] = i183;
444-
allInts[184] = i184;
445-
allInts[185] = i185;
446-
allInts[186] = i186;
447-
allInts[187] = i187;
448-
allInts[188] = i188;
449-
allInts[189] = i189;
450-
allInts[190] = i190;
451-
allInts[191] = i191;
452-
allInts[192] = i192;
453-
allInts[193] = i193;
454-
allInts[194] = i194;
455-
allInts[195] = i195;
456-
allInts[196] = i196;
457-
allInts[197] = i197;
458-
allInts[198] = i198;
459-
allInts[199] = i199;
460-
allInts[200] = i200;
461-
allInts[201] = i201;
462-
allInts[202] = i202;
463-
allInts[203] = i203;
464-
allInts[204] = i204;
465-
allInts[205] = i205;
466-
allInts[206] = i206;
467-
allInts[207] = i207;
468-
allInts[208] = i208;
469-
allInts[209] = i209;
470-
allInts[210] = i210;
471-
allInts[211] = i211;
472-
allInts[212] = i212;
473-
allInts[213] = i213;
474-
allInts[214] = i214;
475-
allInts[215] = i215;
476-
allInts[216] = i216;
477-
allInts[217] = i217;
478-
allInts[218] = i218;
479-
allInts[219] = i219;
480-
allInts[220] = i220;
481-
allInts[221] = i221;
482-
allInts[222] = i222;
483-
allInts[223] = i223;
484-
allInts[224] = i224;
485-
allInts[225] = i225;
486-
allInts[226] = i226;
487-
allInts[227] = i227;
488-
allInts[228] = i228;
489-
allInts[229] = i229;
490-
allInts[230] = i230;
491-
allInts[231] = i231;
492-
allInts[232] = i232;
493-
allInts[233] = i233;
494-
allInts[234] = i234;
495-
allInts[235] = i235;
496-
allInts[236] = i236;
497-
allInts[237] = i237;
498-
allInts[238] = i238;
499-
allInts[239] = i239;
500-
allInts[240] = i240;
501-
allInts[241] = i241;
502-
allInts[242] = i242;
503-
allInts[243] = i243;
504-
allInts[244] = i244;
505-
allInts[245] = i245;
506-
allInts[246] = i246;
507-
allInts[247] = i247;
508-
allInts[248] = i248;
509-
allInts[249] = i249;
510-
allInts[250] = i250;
511-
allInts[251] = i251;
512-
allInts[252] = i252;
513-
allInts[253] = i253;
514-
allInts[254] = i254;
515-
allInts[255] = i255;
516-
assert(allInts[255] + allInts[0] == 255);
364+
assert(allInts[179] + allInts[0] == 179);
517365
}
518366
}

0 commit comments

Comments
 (0)