752N/A * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. 752N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 752N/A * This code is free software; you can redistribute it and/or modify it 752N/A * under the terms of the GNU General Public License version 2 only, as 752N/A * published by the Free Software Foundation. 752N/A * This code is distributed in the hope that it will be useful, but WITHOUT 752N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 752N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 752N/A * version 2 for more details (a copy is included in the LICENSE file that 752N/A * accompanied this code). 752N/A * You should have received a copy of the GNU General Public License version 752N/A * 2 along with this work; if not, write to the Free Software Foundation, 752N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 752N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 752N/A * or visit www.oracle.com if you need additional information or have any 752N/A * @bug 4607272 6999915 7185340 752N/A * @summary Unit test for AsynchronousSocketChannel 752N/A * Heap buffers must be substituted with direct buffers when doing I/O. This 752N/A * test creates a scenario on Windows that challenges the per-thread buffer 752N/A * cache and quickly leads to an OutOfMemoryError if temporary buffers are 752N/A * not returned to the native heap. 752N/A static final int K =
1024;
for (
int i=
0; i<
1024; i++) {
// write data so that the read can complete // print summary of buffer pool usage