public static bool Test(int N) { for (int loop = 0; loop < N; ++loop) { Toggle mainToggle = new Toggle(true); for (int i = 0; i < 5; i++) { sVolatileValue = mainToggle.activate().value(); } // Create temp objects (that are going to be collected soon) for (int i = 0; i < NUM_TOGGLE; i++) { Toggle toggle = new Toggle(true); } NthToggle nthToggle = new NthToggle(true, 3); for (int i = 0; i < 8; i++) { sVolatileValue = nthToggle.activate().value(); } for (int i = 0; i < NUM_TOGGLE; i++) { NthToggle toggle = new NthToggle(true, 3); } // To make sure local variables are traced correctly... for (int i = 0; i < 5; i++) { sVolatileValue = mainToggle.activate().value(); } for (int i = 0; i < 8; i++) { sVolatileValue = nthToggle.activate().value(); } } return (true); }
public static bool Test(int N) { for (int loop = 0; loop < N; ++loop) { Toggle mainToggle = new Toggle(true); for (int i = 0; i < 5; i++) { sVolatileValue = mainToggle.activate().value(); } // Create temp objects (that are going to be collected soon) for (int i = 0; i < NUM_TOGGLE; i++) { Toggle toggle = new Toggle(true); } NthToggle nthToggle = new NthToggle(true, 3); for (int i = 0; i < 8; i++) { sVolatileValue = nthToggle.activate().value(); } for (int i = 0; i < NUM_TOGGLE; i++) { NthToggle toggle = new NthToggle(true, 3); } // To make sure local variables are traced correctly... for (int i = 0; i < 5; i++) { sVolatileValue = mainToggle.activate().value(); } for (int i = 0; i < 8; i++) { sVolatileValue = nthToggle.activate().value(); } } return(true); }