shithub: riscv

Download patch

ref: e6d455a3e6847b52c5fb901e1636f207ffe7ced7
parent: 9e9d694fbd8fe8e2e0b68aec0f49416e671adf31
author: cinap_lenrek <cinap_lenrek@centraldogma>
date: Wed Nov 16 16:24:26 EST 2011

libsec: setmalloctag

--- a/sys/src/libsec/port/tlshand.c
+++ b/sys/src/libsec/port/tlshand.c
@@ -2195,6 +2195,7 @@
 		exits("out of memory");
 	}
 	memset(p, 0, n);
+	setmalloctag(p, getcallerpc(&n));
 	return p;
 }
 
@@ -2208,6 +2209,7 @@
 	else if(!(ReallocP = realloc(ReallocP, ReallocN))){
 		exits("out of memory");
 	}
+	setrealloctag(ReallocP, getcallerpc(&ReallocP));
 	return(ReallocP);
 }