Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/backend_elf.c

    r137691a r98000fb  
    232232void elf_frame_free(as_area_t *area, uintptr_t page, uintptr_t frame)
    233233{
     234        elf_header_t *elf = area->backend_data.elf;
    234235        elf_segment_header_t *entry = area->backend_data.segment;
    235         uintptr_t start_anon;
     236        uintptr_t base, start_anon;
     237        size_t i;
    236238
    237239        ASSERT((page >= ALIGN_DOWN(entry->p_vaddr, PAGE_SIZE)) &&
    238240            (page < entry->p_vaddr + entry->p_memsz));
     241        i = (page - ALIGN_DOWN(entry->p_vaddr, PAGE_SIZE)) >> PAGE_WIDTH;
     242        base = (uintptr_t) (((void *) elf) +
     243            ALIGN_DOWN(entry->p_offset, FRAME_SIZE));
    239244        start_anon = entry->p_vaddr + entry->p_filesz;
    240245
     
    252257                 * lower part is backed by the ELF image and the upper is
    253258                 * anonymous). In any case, a frame needs to be freed.
    254                  */
     259                 */ 
    255260                frame_free(frame);
    256261        }
Note: See TracChangeset for help on using the changeset viewer.