Rev 977 | Rev 983 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 977 | Rev 980 | ||
---|---|---|---|
Line 398... | Line 398... | ||
398 | /* |
398 | /* |
399 | * Releasing physical memory. |
399 | * Releasing physical memory. |
400 | * This depends on the fact that the memory was allocated using frame_alloc(). |
400 | * This depends on the fact that the memory was allocated using frame_alloc(). |
401 | */ |
401 | */ |
402 | pte = page_mapping_find(as, area->base + i*PAGE_SIZE); |
402 | pte = page_mapping_find(as, area->base + i*PAGE_SIZE); |
403 | if (pte) { |
403 | if (pte && PTE_VALID(pte)) { |
404 | ASSERT(PTE_PRESENT(pte)); |
404 | ASSERT(PTE_PRESENT(pte)); |
405 | frame_free(ADDR2PFN(PTE_GET_FRAME(pte))); |
405 | frame_free(ADDR2PFN(PTE_GET_FRAME(pte))); |
406 | } |
406 | } |
407 | page_mapping_remove(as, area->base + i*PAGE_SIZE); |
407 | page_mapping_remove(as, area->base + i*PAGE_SIZE); |
408 | } |
408 | } |