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

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


Set malloc tags.
 [rsc] --rw-rw-r-- M 15674 glenda sys 4160 Nov 10 10:48 sys/src/libdraw/alloc.c
	/n/sourcesdump/2005/1110/plan9/sys/src/libdraw/alloc.c:5,11 - 
	/n/sourcesdump/2005/1111/plan9/sys/src/libdraw/alloc.c:5,16
	  Image*
	  allocimage(Display *d, Rectangle r, ulong chan, int repl, ulong val)
	  {
	- 	return _allocimage(nil, d, r, chan, repl, val, 0, 0);
	+ 	Image*	i;
	+ 
	+ 	i =  _allocimage(nil, d, r, chan, repl, val, 0, 0);
	+ 	if (i)
	+ 		setmalloctag(i, getcallerpc(&d));
	+ 	return i;
	  }
	  
	  Image*
 [rsc] --rw-rw-r-- M 15674 glenda sys 2415 Nov 10 10:48 sys/src/libdraw/creadimage.c
	/n/sourcesdump/2005/1110/plan9/sys/src/libdraw/creadimage.c:58,63 - 
	/n/sourcesdump/2005/1111/plan9/sys/src/libdraw/creadimage.c:58,64
	  		if(dolock)
	  			lockdisplay(d);
	  		i = allocimage(d, r, chan, 0, 0);
	+ 		setmalloctag(i, getcallerpc(&d));
	  		if(dolock)
	  			unlockdisplay(d);
	  		if(i == nil)
 [rsc] --rw-rw-r-- M 15674 glenda sys 807 Nov 10 10:48 sys/src/libdraw/getsubfont.c
	/n/sourcesdump/2005/1110/plan9/sys/src/libdraw/getsubfont.c:32,36 - 
	/n/sourcesdump/2005/1111/plan9/sys/src/libdraw/getsubfont.c:32,37
	  	if(f == 0)
	  		fprint(2, "getsubfont: can't read %s: %r\n", name);
	  	close(fd);
	+ 	setmalloctag(f, getcallerpc(&d));
	  	return f;
	  }


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].