comparison src/share/vm/utilities/ostream.hpp @ 11136:dbc0b5dc08f5

7143807: ResourceMark nesting problem in stringStream Reviewed-by: kvn, dcubed
author fparain
date Wed, 10 Jul 2013 15:49:15 +0000
parents e12c9b3740db
children 621eda7235d2
comparison
equal deleted inserted replaced
11105:22baec423e2f 11136:dbc0b5dc08f5
25 #ifndef SHARE_VM_UTILITIES_OSTREAM_HPP 25 #ifndef SHARE_VM_UTILITIES_OSTREAM_HPP
26 #define SHARE_VM_UTILITIES_OSTREAM_HPP 26 #define SHARE_VM_UTILITIES_OSTREAM_HPP
27 27
28 #include "memory/allocation.hpp" 28 #include "memory/allocation.hpp"
29 #include "runtime/timer.hpp" 29 #include "runtime/timer.hpp"
30
31 DEBUG_ONLY(class ResourceMark;)
30 32
31 // Output streams for printing 33 // Output streams for printing
32 // 34 //
33 // Printing guidelines: 35 // Printing guidelines:
34 // Where possible, please use tty->print() and tty->print_cr(). 36 // Where possible, please use tty->print() and tty->print_cr().
175 protected: 177 protected:
176 char* buffer; 178 char* buffer;
177 size_t buffer_pos; 179 size_t buffer_pos;
178 size_t buffer_length; 180 size_t buffer_length;
179 bool buffer_fixed; 181 bool buffer_fixed;
182 DEBUG_ONLY(ResourceMark* rm;)
180 public: 183 public:
181 stringStream(size_t initial_bufsize = 256); 184 stringStream(size_t initial_bufsize = 256);
182 stringStream(char* fixed_buffer, size_t fixed_buffer_size); 185 stringStream(char* fixed_buffer, size_t fixed_buffer_size);
183 ~stringStream(); 186 ~stringStream();
184 virtual void write(const char* c, size_t len); 187 virtual void write(const char* c, size_t len);