Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2005/1118/4

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


Add malloc tags.
 [rsc] --rw-rw-r-- M 55859 glenda sys 589 Nov 18 11:32 sys/src/libc/9sys/getenv.c
	/n/sourcesdump/2005/1118/plan9/sys/src/libc/9sys/getenv.c:20,25 - 
	/n/sourcesdump/2005/1119/plan9/sys/src/libc/9sys/getenv.c:20,26
	  	s = seek(f, 0, 2);
	  	ans = malloc(s+1);
	  	if(ans) {
	+ 		setmalloctag(ans, getcallerpc(&name));
	  		seek(f, 0, 0);
	  		r = read(f, ans, s);
	  		if(r >= 0) {
 [rsc] --rw-rw-r-- M 55859 glenda sys 205 Nov 18 11:32 sys/src/libc/fmt/smprint.c
	/n/sourcesdump/2005/1118/plan9/sys/src/libc/fmt/smprint.c:10,14 - 
	/n/sourcesdump/2005/1119/plan9/sys/src/libc/fmt/smprint.c:10,15
	  	va_start(args, fmt);
	  	p = vsmprint(fmt, args);
	  	va_end(args);
	+ 	setmalloctag(p, getcallerpc(&fmt));
	  	return p;
	  }


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].