# HG changeset patch # User John Tsiombikas # Date 1311820439 -10800 # Node ID b793b8fcba7d6ef6f2c2c15f2d71360948971449 # Parent b8f02479e3f4d1f29d2b99cd45861f77aa62e665 apparently free_phys_page was never tested. the check for double-freeing a page was inverted. diff -r b8f02479e3f4 -r b793b8fcba7d src/mem.c --- a/src/mem.c Tue Jul 26 02:41:33 2011 +0300 +++ b/src/mem.c Thu Jul 28 05:33:59 2011 +0300 @@ -142,7 +142,7 @@ last_alloc_idx = idx; - printf("alloc_phys_page() -> %x (page: %d)\n", PAGE_TO_ADDR(pg), pg); + /*printf("alloc_phys_page() -> %x (page: %d)\n", PAGE_TO_ADDR(pg), pg);*/ set_intr_state(intr_state); return PAGE_TO_ADDR(pg); @@ -173,7 +173,7 @@ int intr_state = get_intr_state(); disable_intr(); - if(!IS_FREE(pg)) { + if(IS_FREE(pg)) { panic("free_phys_page(%d): I thought that was already free!\n", pg); }