diff options
author | rsc <devnull@localhost> | 2006-07-18 15:26:33 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-07-18 15:26:33 +0000 |
commit | 28b49df3542a635cca788f3de213385f3fcb6334 (patch) | |
tree | a3a30774249929e66988bf77e76df9459acb50bc /src/cmd/venti/srv/utils.c | |
parent | 686bd37d9d8db5e3b969a3aa2d5b455e0976b262 (diff) | |
download | plan9port-28b49df3542a635cca788f3de213385f3fcb6334.tar.gz plan9port-28b49df3542a635cca788f3de213385f3fcb6334.tar.bz2 plan9port-28b49df3542a635cca788f3de213385f3fcb6334.zip |
assorted changes from Plan 9
Diffstat (limited to 'src/cmd/venti/srv/utils.c')
-rw-r--r-- | src/cmd/venti/srv/utils.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmd/venti/srv/utils.c b/src/cmd/venti/srv/utils.c index 03fd9065..0fd0f04f 100644 --- a/src/cmd/venti/srv/utils.c +++ b/src/cmd/venti/srv/utils.c @@ -148,6 +148,7 @@ emalloc(ulong n) sysfatal("out of memory allocating %lud", n); } memset(p, 0xa5, n); + setmalloctag(p, getcallerpc(&n)); if(0)print("emalloc %p-%p by %lux\n", p, (char*)p+n, getcallerpc(&n)); return p; } @@ -164,6 +165,7 @@ ezmalloc(ulong n) sysfatal("out of memory allocating %lud", n); } memset(p, 0, n); + setmalloctag(p, getcallerpc(&n)); if(0)print("ezmalloc %p-%p by %lux\n", p, (char*)p+n, getcallerpc(&n)); return p; } @@ -177,6 +179,7 @@ erealloc(void *p, ulong n) abort(); sysfatal("out of memory allocating %lud", n); } + setrealloctag(p, getcallerpc(&p)); if(0)print("erealloc %p-%p by %lux\n", p, (char*)p+n, getcallerpc(&p)); return p; } @@ -190,6 +193,7 @@ estrdup(char *s) n = strlen(s) + 1; t = emalloc(n); memmove(t, s, n); + setmalloctag(t, getcallerpc(&s)); if(0)print("estrdup %p-%p by %lux\n", t, (char*)t+n, getcallerpc(&s)); return t; } @@ -231,6 +235,7 @@ ventifmtinstall(void) fmtinstall('F', vtfcallfmt); fmtinstall('H', encodefmt); fmtinstall('I', ientryfmt); + fmtinstall('T', vttimefmt); fmtinstall('V', vtscorefmt); } |