Changeset 3ac69647 in mainline
- Timestamp:
- 2011-04-17T19:25:16Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8f6c6264
- Parents:
- 2c86f81
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/backend_elf.c
r2c86f81 r3ac69647 70 70 }; 71 71 72 bool elf_create(as_area_t *area)72 static size_t elf_nonanon_pages_get(as_area_t *area) 73 73 { 74 74 elf_segment_header_t *entry = area->backend_data.segment; … … 76 76 77 77 if (entry->p_flags & PF_W) 78 nonanon_pages = 0; 78 return 0; 79 80 return nonanon_pages; 81 } 82 83 bool elf_create(as_area_t *area) 84 { 85 size_t nonanon_pages = elf_nonanon_pages_get(area); 79 86 80 87 if (area->pages <= nonanon_pages) … … 86 93 bool elf_resize(as_area_t *area, size_t new_pages) 87 94 { 88 elf_segment_header_t *entry = area->backend_data.segment; 89 size_t nonanon_pages = ALIGN_DOWN(entry->p_filesz, PAGE_SIZE); 90 91 if (entry->p_flags & PF_W) 92 nonanon_pages = 0; 95 size_t nonanon_pages = elf_nonanon_pages_get(area); 93 96 94 97 if (new_pages > area->pages) { … … 199 202 void elf_destroy(as_area_t *area) 200 203 { 201 elf_segment_header_t *entry = area->backend_data.segment; 202 size_t nonanon_pages = ALIGN_DOWN(entry->p_filesz, PAGE_SIZE); 203 204 if (entry->p_flags & PF_W) 205 nonanon_pages = 0; 204 size_t nonanon_pages = elf_nonanon_pages_get(area); 206 205 207 206 if (area->pages > nonanon_pages)
Note:
See TracChangeset
for help on using the changeset viewer.