diff options
author | Petter Rodhelind <petter.rodhelind@gmail.com> | 2020-02-11 13:40:11 +0100 |
---|---|---|
committer | Petter Rodhelind <petter.rodhelind@gmail.com> | 2020-02-11 13:40:11 +0100 |
commit | 9c79e48c93c0c4d14aabcb490fab048d68934cb2 (patch) | |
tree | 1d57d3fd193621a2357473bb65b92190914c5736 /src/cmd/9term | |
parent | 02d7aa8915f9c3a3288dab01f321eb94ba219e3b (diff) | |
parent | 0237dec768a4ee36ae9e18ce8566d2c999d78410 (diff) | |
download | plan9port-9c79e48c93c0c4d14aabcb490fab048d68934cb2.tar.gz plan9port-9c79e48c93c0c4d14aabcb490fab048d68934cb2.tar.bz2 plan9port-9c79e48c93c0c4d14aabcb490fab048d68934cb2.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/cmd/9term')
-rw-r--r-- | src/cmd/9term/malloc.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/cmd/9term/malloc.c b/src/cmd/9term/malloc.c index 9132235b..7b590bc4 100644 --- a/src/cmd/9term/malloc.c +++ b/src/cmd/9term/malloc.c @@ -7,8 +7,6 @@ #define NOPLAN9DEFINES #include <libc.h> -static Lock malloclock; - void* p9malloc(ulong n) { @@ -16,9 +14,7 @@ p9malloc(ulong n) if(n == 0) n++; - lock(&malloclock); v = malloc(n); - unlock(&malloclock); print("p9malloc %lud => %p; pc %lux\n", n, v, getcallerpc(&n)); return v; } @@ -28,10 +24,8 @@ p9free(void *v) { if(v == nil) return; - lock(&malloclock); print("p9free %p; pc %lux\n", v, getcallerpc(&v)); free(v); - unlock(&malloclock); } void* @@ -42,9 +36,7 @@ p9calloc(ulong a, ulong b) if(a*b == 0) a = b = 1; - lock(&malloclock); v = calloc(a*b, 1); - unlock(&malloclock); print("p9calloc %lud %lud => %p; pc %lux\n", a, b, v, getcallerpc(&a)); return v; } @@ -54,9 +46,7 @@ p9realloc(void *v, ulong n) { void *vv; - lock(&malloclock); vv = realloc(v, n); - unlock(&malloclock); print("p9realloc %p %lud => %p; pc %lux\n", v, n, vv, getcallerpc(&v)); return vv; } |