Mercurial > hg > truffle
comparison src/share/vm/compiler/disassembler.cpp @ 20435:094cbdffa87d
8054292: code comments leak in fastdebug builds
Summary: Added deallocation to destructor; hardened interface against misuse
Reviewed-by: kvn
author | drchase |
---|---|
date | Fri, 29 Aug 2014 19:45:49 -0400 |
parents | 78bbf4d43a14 |
children | 7848fc12602b |
comparison
equal
deleted
inserted
replaced
20428:4d8781a35525 | 20435:094cbdffa87d |
---|---|
243 void set_total_ticks(int n) { _total_ticks = n; } | 243 void set_total_ticks(int n) { _total_ticks = n; } |
244 const char* options() { return _option_buf; } | 244 const char* options() { return _option_buf; } |
245 }; | 245 }; |
246 | 246 |
247 decode_env::decode_env(CodeBlob* code, outputStream* output, CodeStrings c) { | 247 decode_env::decode_env(CodeBlob* code, outputStream* output, CodeStrings c) { |
248 memset(this, 0, sizeof(*this)); | 248 memset(this, 0, sizeof(*this)); // Beware, this zeroes bits of fields. |
249 _output = output ? output : tty; | 249 _output = output ? output : tty; |
250 _code = code; | 250 _code = code; |
251 if (code != NULL && code->is_nmethod()) | 251 if (code != NULL && code->is_nmethod()) |
252 _nm = (nmethod*) code; | 252 _nm = (nmethod*) code; |
253 _strings.assign(c); | 253 _strings.copy(c); |
254 | 254 |
255 // by default, output pc but not bytes: | 255 // by default, output pc but not bytes: |
256 _print_pc = true; | 256 _print_pc = true; |
257 _print_bytes = false; | 257 _print_bytes = false; |
258 _bytes_per_line = Disassembler::pd_instruction_alignment(); | 258 _bytes_per_line = Disassembler::pd_instruction_alignment(); |