void kfree(void *ptr) { /* * Try subpage first; if that fails, assume it's a big allocation. */ if (ptr == NULL) { return; } else if (subpage_kfree(ptr)) { KASSERT((vaddr_t)ptr%PAGE_SIZE==0); free_kpages((vaddr_t)ptr); } }
void kfree(void *ptr) { /* * Try subpage first; if that fails, assume it's a big allocation. */ //kprintf("free memory: 0x%08x\n",(unsigned int)ptr); if (ptr == NULL) { return; } else if (subpage_kfree(ptr)) { KASSERT((vaddr_t)ptr%PAGE_SIZE==0); free_kpages((vaddr_t)ptr); } }