kern

changeset 46:b793b8fcba7d

apparently free_phys_page was never tested. the check for double-freeing a page was inverted.
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 28 Jul 2011 05:33:59 +0300
parents b8f02479e3f4
children f65b348780e3
files src/mem.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/src/mem.c	Tue Jul 26 02:41:33 2011 +0300
     1.2 +++ b/src/mem.c	Thu Jul 28 05:33:59 2011 +0300
     1.3 @@ -142,7 +142,7 @@
     1.4  
     1.5  					last_alloc_idx = idx;
     1.6  
     1.7 -					printf("alloc_phys_page() -> %x (page: %d)\n", PAGE_TO_ADDR(pg), pg);
     1.8 +					/*printf("alloc_phys_page() -> %x (page: %d)\n", PAGE_TO_ADDR(pg), pg);*/
     1.9  
    1.10  					set_intr_state(intr_state);
    1.11  					return PAGE_TO_ADDR(pg);
    1.12 @@ -173,7 +173,7 @@
    1.13  	int intr_state = get_intr_state();
    1.14  	disable_intr();
    1.15  
    1.16 -	if(!IS_FREE(pg)) {
    1.17 +	if(IS_FREE(pg)) {
    1.18  		panic("free_phys_page(%d): I thought that was already free!\n", pg);
    1.19  	}
    1.20