MCPcopy Create free account
hub / github.com/badvision/jace / reconfigure

Method reconfigure

src/main/java/jace/state/StateManager.java:278–291  ·  view source on GitHub ↗

If reconfigure is called, it means the emulator state has changed too greatly and we need to abandon captured states and start from scratch.

()

Source from the content-addressed store, hash-verified

276 * greatly and we need to abandon captured states and start from scratch.
277 */
278 @Override
279 public void reconfigure() {
280 boolean resume = computer.pause();
281 isValid = false;
282
283 // Now figure out how much memory we're allowed to eat
284 maxMemory = Runtime.getRuntime().maxMemory();
285 // If we have less than 2% heap remaining then states will be recycled
286 freeRequired = maxMemory / 50L;
287 frameCounter = captureFrequency;
288 if (resume) {
289 computer.resume();
290 }
291 }
292 boolean isValid = false;
293
294 public void invalidate() {

Callers

nothing calls this directly

Calls 2

pauseMethod · 0.45
resumeMethod · 0.45

Tested by

no test coverage detected