~kris/9p

9hist

a22bb86fe02e00bb493e7aecba85f93508ade87e — David du Colombier 34 years ago 715b1a6
Plan 9 from Bell Labs 1992-07-29
2 files changed, 6 insertions(+), 3 deletions(-)

M port/alloc.c
M port/devbit.c
M port/alloc.c => port/alloc.c +4 -3
@@ 130,12 130,12 @@ xspanalloc(ulong size, int align, ulong span)
	ulong a, p, sinc;
	ulong ptr[Spanlist];

	sinc = span/8;
	sinc = size/8;
	span = ~(span-1);
	for(i = 0; i < Spanlist; i++) {
		p = (ulong)xalloc(size+align);
		if(p == 0)
			panic("xspanalloc: %d %d %lux", size, align, span);
			break;

		a = p+align;
		a &= ~(align-1);


@@ 150,7 150,8 @@ xspanalloc(ulong size, int align, ulong span)
		ptr[i] = (ulong)xalloc(sinc);
	}
	USED(sinc);
	panic("xspanalloc: spanlist");		
	xsummary();
	panic("xspanalloc: %d %d %lux\n", size, align, span);	
	return 0;
}


M port/devbit.c => port/devbit.c +2 -0
@@ 1411,6 1411,8 @@ bitwrite(Chan *c, void *va, long n, ulong offset)
			v = BGSHORT(p+1);
			if(v<0 || v>=bit.nfont || (ff=bit.font[v])==0)
				error(Ebadblt);
			if(ff->b == 0)
				error(Ebadbitmap);
			l = BGSHORT(p+3);
			if(l >= ff->ncache)
				error(Ebadblt);