plan 9 kernel history: overview | file list | diff list

1990/0709/gnot/mmu.c (diff list | history)

1990/0603/sys/src/9/gnot/mmu.c:63,691990/0709/sys/src/9/gnot/mmu.c:63,69 (short | long | prev | next)
1990/06021    
 
	if(kmapalloc.init == 0){ 
		k = &kmapalloc.arena[0]; 
		k->va = KZERO|(3*1024*1024); 
1990/0709    
		k->va = KZERO|(4*1024*1024-256*1024-BY2PG); 
1990/06021    
		k->next = 0; 
		kmapalloc.free = k; 
		kmapalloc.init = 1; 
1990/0603/sys/src/9/gnot/mmu.c:71,761990/0709/sys/src/9/gnot/mmu.c:71,77
1990/06021    
	} 
	e = (4*1024*1024 - 256*1024)/BY2PG;	/* screen lives at top 256K */ 
	i = (((ulong)ialloc(0, 0))&~KZERO)/BY2PG; 
1990/0709    
	print("%lud free map registers\n", e-i); 
1990/06021    
	kmapalloc.free = 0; 
	for(k=&kmapalloc.arena[i]; i<e; i++,k++){ 
		k->va = i*BY2PG|KZERO; 
1990/0603/sys/src/9/gnot/mmu.c:85,921990/0709/sys/src/9/gnot/mmu.c:86,95
1990/06021    
 
	lock(&kmapalloc); 
	k = kmapalloc.free; 
	if(k == 0) 
1990/0709    
	if(k == 0){ 
		dumpstack(); 
1990/06021    
		panic("kmap"); 
1990/0709    
	} 
1990/06021    
	kmapalloc.free = k->next; 
	unlock(&kmapalloc); 
	k->pa = pg->pa; 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)