Try increasing startup buffer size to see if it fixes tinderbox orange.
authordbaron@dbaron.org
Tue, 03 Apr 2007 17:39:56 -0700
changeset 309 503b4a4f93bba4ee0aeda47244397c40481399cb
parent 308 575e080e3b20543206e2664cbadc2e8d26a77c27
child 310 fd323341d5eb7bafbcc98953df975b101591fa41
push idunknown
push userunknown
push dateunknown
milestone1.9a4pre
Try increasing startup buffer size to see if it fixes tinderbox orange.
tools/trace-malloc/lib/nsTraceMalloc.c
--- a/tools/trace-malloc/lib/nsTraceMalloc.c
+++ b/tools/trace-malloc/lib/nsTraceMalloc.c
@@ -269,17 +269,17 @@ struct AllocationFuncs
 #endif
   int          prevent_reentry;
 }gAllocFuncs;
 
 #endif /* !XP_UNIX */
 
 typedef struct logfile logfile;
 
-#define STARTUP_TMBUFSIZE (16 * 1024)
+#define STARTUP_TMBUFSIZE (64 * 1024)
 #define LOGFILE_TMBUFSIZE (16 * 1024)
 
 struct logfile {
     int         fd;
     int         lfd;            /* logical fd, dense among all logfiles */
     char        *buf;
     int         bufsize;
     int         pos;
@@ -379,16 +379,18 @@ static void flush_logfile(logfile *fp)
             cnt = write(fd, bp, len);
             if (cnt <= 0) {
                 printf("### nsTraceMalloc: write failed or wrote 0 bytes!\n");
                 return;
             }
             bp += cnt;
             len -= cnt;
         } while (len > 0);
+    } else {
+        fprintf(stderr, "### nsTraceMalloc: can't flush to closed log file\n");
     }
     fp->simsize += len;
 }
 
 static void log_byte(logfile *fp, char byte)
 {
     if (fp->pos == fp->bufsize)
         flush_logfile(fp);