/* realloc memory for string length */
- logtext = DMREALLOC(logtext, char, *logtextlen, *logtextlen + len);
+ logtext = (char*) DumpMemory::reallocate(logtext, *logtextlen, *logtextlen + len);
*logtextlen += len;
/* convert to utf8 string and strcat it to the logtext */
/* realloc memory for string length */
- logtext = DMREALLOC(logtext, char, *logtextlen, *logtextlen + len);
+ logtext = (char*) DumpMemory::reallocate(logtext, *logtextlen, *logtextlen + len);
*logtextlen += len;
/* strcat to the logtext */
s4 logtextlen;
s4 i;
s4 pos;
- int32_t dumpmarker;
/* We don't trace builtin functions here because the argument
passing happens via the native ABI and does not fit these
strlen("...(255)") +
strlen(")");
- /* allocate memory */
+ // Create new dump memory area.
+ DumpMemoryArea dma();
- DMARKER;
-
- logtext = DMNEW(char, logtextlen);
+ // TODO Use a std::string here.
+ logtext = (char*) DumpMemory::allocate(sizeof(char) * logtextlen);
TRACEJAVACALLCOUNT++;
log_text(logtext);
- /* release memory */
-
- DRELEASE;
-
TRACEJAVACALLINDENT++;
-
}
/* trace_java_call_exit ********************************************************
s4 i;
s4 pos;
imm_union val;
- int32_t dumpmarker;
/* We don't trace builtin functions here because the argument
passing happens via the native ABI and does not fit these
logtextlen += strlen("->0.4872328470301428 (0x0123456789abcdef)");
- /* allocate memory */
+ // Create new dump memory area.
+ DumpMemoryArea dma();
- DMARKER;
-
- logtext = DMNEW(char, logtextlen);
+ // TODO Use a std::string here.
+ logtext = (char*) DumpMemory::allocate(sizeof(char) * logtextlen);
/* generate the message */
}
log_text(logtext);
-
- /* release memory */
-
- DRELEASE;
}
char *logtext;
s4 logtextlen;
codeinfo *code;
- int32_t dumpmarker;
/* calculate message length */
logtextlen += strlen("0");
- /* allocate memory */
+ // Create new dump memory area.
+ DumpMemoryArea dma();
- DMARKER;
-
- logtext = DMNEW(char, logtextlen);
+ // TODO Use a std::string here.
+ logtext = (char*) DumpMemory::allocate(sizeof(char) * logtextlen);
if (xptr) {
strcpy(logtext, "Exception ");
strcat(logtext, "call_java_method");
log_text(logtext);
-
- /* release memory */
-
- DRELEASE;
}
{
char *logtext;
s4 logtextlen;
- int32_t dumpmarker;
java_lang_Throwable jlt(h);
logtextlen += strlen("(nil)");
}
- /* allocate memory */
+ // Create new dump memory area.
+ DumpMemoryArea dma();
- DMARKER;
-
- logtext = DMNEW(char, logtextlen);
+ logtext = (char*) DumpMemory::allocate(sizeof(char) * logtextlen);
strcpy(logtext, "Builtin exception thrown: ");
}
log_text(logtext);
-
- /* release memory */
-
- DRELEASE;
}
} // extern "C"