8197608: MacroAssembler::unimplemented calls global operator new[]
Removed C heap allocation of string buffers. Reviewed-by: kvn, shade
This commit is contained in:
parent
51ab999e0e
commit
2c5a0835a9
@ -2056,9 +2056,14 @@ void MacroAssembler::stop(const char* msg) {
|
||||
}
|
||||
|
||||
void MacroAssembler::unimplemented(const char* what) {
|
||||
char* b = new char[1024];
|
||||
jio_snprintf(b, 1024, "unimplemented: %s", what);
|
||||
stop(b);
|
||||
const char* buf = NULL;
|
||||
{
|
||||
ResourceMark rm;
|
||||
stringStream ss;
|
||||
ss.print("unimplemented: %s", what);
|
||||
buf = code_string(ss.as_string());
|
||||
}
|
||||
stop(buf);
|
||||
}
|
||||
|
||||
// If a constant does not fit in an immediate field, generate some
|
||||
|
@ -1411,9 +1411,14 @@ void MacroAssembler::untested(const char* what) {
|
||||
|
||||
|
||||
void MacroAssembler::unimplemented(const char* what) {
|
||||
char* b = new char[1024];
|
||||
jio_snprintf(b, 1024, "unimplemented: %s", what);
|
||||
stop(b);
|
||||
const char* buf = NULL;
|
||||
{
|
||||
ResourceMark rm;
|
||||
stringStream ss;
|
||||
ss.print("unimplemented: %s", what);
|
||||
buf = code_string(ss.as_string());
|
||||
}
|
||||
stop(buf);
|
||||
}
|
||||
|
||||
|
||||
|
@ -3660,9 +3660,14 @@ void MacroAssembler::os_breakpoint() {
|
||||
}
|
||||
|
||||
void MacroAssembler::unimplemented(const char* what) {
|
||||
char* b = new char[1024];
|
||||
jio_snprintf(b, 1024, "unimplemented: %s", what);
|
||||
stop(b);
|
||||
const char* buf = NULL;
|
||||
{
|
||||
ResourceMark rm;
|
||||
stringStream ss;
|
||||
ss.print("unimplemented: %s", what);
|
||||
buf = code_string(ss.as_string());
|
||||
}
|
||||
stop(buf);
|
||||
}
|
||||
|
||||
#ifdef _LP64
|
||||
|
Loading…
x
Reference in New Issue
Block a user