3261N/A * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 78N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 78N/A * This code is free software; you can redistribute it and/or modify it 78N/A * under the terms of the GNU General Public License version 2 only, as 78N/A * published by the Free Software Foundation. 78N/A * This code is distributed in the hope that it will be useful, but WITHOUT 78N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 78N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 78N/A * version 2 for more details (a copy is included in the LICENSE file that 78N/A * accompanied this code). 78N/A * You should have received a copy of the GNU General Public License version 78N/A * 2 along with this work; if not, write to the Free Software Foundation, 78N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 78N/A * @summary com.sun.crypto.provider.SunJCE instance leak using KRB5 and 78N/A * @author Brad Wetmore 2119N/A * The original test invocation is below, but had to use the above 2119N/A * workaround for bug 6923123. 78N/A * We force the leak to become a problem by specifying the minimum 78N/A * size heap we can (above). In current runs on a server and client 78N/A * machine, it took roughly 220-240 iterations to have the memory leak 78N/A * shut down other operations. It complained about "Unable to verify 78N/A * the SunJCE provider." 78N/A for (
int i =
0; i <=
1000; i++) {
78N/A if ((i %
20) ==
0) {
78N/A // Calling gc() isn't dependable, but doesn't hurt. 78N/A // Gives better output in leak cases.