fix GC log message use of value-width parameter (which might not be available)
svn: r15309
This commit is contained in:
parent
d007777e2a
commit
40f7cdf52a
|
@ -7400,13 +7400,26 @@ static void done_with_GC()
|
||||||
#ifdef MZ_PRECISE_GC
|
#ifdef MZ_PRECISE_GC
|
||||||
static void inform_GC(int major_gc, long pre_used, long post_used)
|
static void inform_GC(int major_gc, long pre_used, long post_used)
|
||||||
{
|
{
|
||||||
if (scheme_main_logger)
|
if (scheme_main_logger) {
|
||||||
scheme_log(scheme_main_logger,
|
/* Don't use scheme_log(), because it wants to allocate a buffer
|
||||||
SCHEME_LOG_DEBUG, 0,
|
based on the max value-print width, and we may not be at a
|
||||||
"GC [%s] at %ld bytes; %ld collected in %ld msec",
|
point where parameters are available. */
|
||||||
(major_gc ? "major" : "minor"),
|
char buf[128];
|
||||||
pre_used, pre_used - post_used,
|
long buflen;
|
||||||
end_this_gc_time - start_this_gc_time);
|
|
||||||
|
sprintf(buf,
|
||||||
|
"GC [%s] at %ld bytes; %ld collected in %ld msec",
|
||||||
|
(major_gc ? "major" : "minor"),
|
||||||
|
pre_used, pre_used - post_used,
|
||||||
|
end_this_gc_time - start_this_gc_time);
|
||||||
|
buflen = strlen(buf);
|
||||||
|
|
||||||
|
scheme_log_message(scheme_main_logger,
|
||||||
|
SCHEME_LOG_DEBUG,
|
||||||
|
buf, buflen,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user