ostream.hpp revision 222
470N/A * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 0N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 0N/A * CA 95054 USA or visit www.sun.com if you need additional information or 0N/A * have any questions. 0N/A// Output streams for printing 0N/A// Printing guidelines: 546N/A// Where possible, please use tty->print() and tty->print_cr(). 546N/A// For product mode VM warnings use warning() which internally uses tty. 546N/A// In places where tty is not initialized yet or too much overhead, 546N/A// we may use jio_printf: 546N/A// jio_fprintf(defaultStream::output_stream(), "Message"); 546N/A// This allows for redirection via -XX:+DisplayVMOutputToStdout and 0N/A// -XX:+DisplayVMOutputToStderr 546N/A // A simplified call that includes a suffix of ": " 546N/A // portable printing of 64 bit integers 546N/A // ANSI C++ name collision 546N/A// advisory locking for the shared tty stream: 546N/A// for writing to strings; buffer will expand automatically 0N/A// unlike fileStream, fdStream does unbuffered I/O by calling 546N/A// open() and write() directly. It is async-safe, but output 546N/A// from multiple thread may be mixed together. Used by fatal 375N/A// staticBufferStream uses a user-supplied buffer for all formatting. 375N/A// Used for safe formatting during fatal error handling. Not MT safe. 0N/A// Do not share the stream between multiple threads. 0N/A// In the non-fixed buffer case an underlying buffer will be created and 0N/A// managed in C heap. Not MT-safe. 375N/A#
define O_BUFLEN 2000 // max size of output of individual print() methods