4 #include "threadimpl.h"
6 static long totalmalloc;
9 _threadmalloc(long size, int z)
15 sysfatal("Malloc of size %ld failed: %r", size);
16 setmalloctag(m, getcallerpc(&size));
18 if (size > 100000000) {
19 fprint(2, "Malloc of size %ld, total %ld\n", size, totalmalloc);
28 _threadsysfatal(char *fmt, va_list arg)
30 char buf[1024]; /* size doesn't matter; we're about to exit */
32 vseprint(buf, buf+sizeof(buf), fmt, arg);
34 fprint(2, "%s: %s\n", argv0, buf);
36 fprint(2, "%s\n", buf);