/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// The test driver script will allow this program to run until we
// reach DEFAULT_LOOP_TIME or a decrease in instance counts is
// observed. For this particular WeakReference leak, the count
// was always observed to be increasing so if we get a decreasing
// count, then the leak is fixed in the bits being tested.
// Two minutes has been enough time to observe a decrease in
// fixed bits on overloaded systems, but the test will likely
// finish more quickly.
// execute the AnonLoggerWeakRefLeak app work
int loop_time = 0;
int max_loop_time = DEFAULT_LOOP_TIME;
// args[0] is the port-file
+ max_loop_time + " seconds.");
} else {
try {
} catch (NumberFormatException nfe) {
+ "': is not a valid seconds value.");
}
}
long count = 0;
long now = 0;
// Print initial call count to let caller know that
// we're up and running and then periodically
}
for (int i = 0; i < 100; i++) {
// this Logger call is leaking a WeakReference in Logger.kids
count++;
}
try {
// delay for 1/10 of a second to avoid CPU saturation
} catch (InterruptedException ie) {
// ignore any exceptions
}
}
}
}
}