Merge branch 'master' of git+ssh://am.lcs/home/am0/6.828/xv6
This commit is contained in:
		
						commit
						5c4dc7395b
					
				
					 1 changed files with 3 additions and 4 deletions
				
			
		
							
								
								
									
										7
									
								
								kalloc.c
									
										
									
									
									
								
							
							
						
						
									
										7
									
								
								kalloc.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -24,10 +24,9 @@ kinit(void)
 | 
			
		|||
  extern char end[];
 | 
			
		||||
 | 
			
		||||
  initlock(&kmem.lock, "kmem");
 | 
			
		||||
  char *p1 = (char*)PGROUNDUP((uint)end);
 | 
			
		||||
  char *p2 = PGROUNDDOWN(PHYSTOP);
 | 
			
		||||
  for( ; p1 < p2; p1 += 4096)
 | 
			
		||||
    kfree(p1);
 | 
			
		||||
  char *p = (char*)PGROUNDUP((uint)end);
 | 
			
		||||
  for( ; p + PGSIZE - 1 < (char*) PHYSTOP; p += PGSIZE)
 | 
			
		||||
    kfree(p);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//PAGEBREAK: 21
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue