Changeset 9a9c805 in mainline
- Timestamp:
- 2012-11-07T10:50:20Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5892ec1
- Parents:
- 1107050
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/backend_anon.c
r1107050 r9a9c805 236 236 */ 237 237 238 unsigned int flags;239 240 238 if (area->flags & AS_AREA_NORESERVE) { 241 239 /* 242 * This is a NORESERVE area, which means that no 243 * physical memory has been reserved beforehands. 244 * We therefore need to make an atomic and reserving 245 * allocation. 240 * Reserve the memory for this page now. 246 241 */ 247 flags = FRAME_ATOMIC; 248 } else { 249 /* 250 * The physical memory has already been reserved 251 * when this part of the area was created. Avoid 252 * double reservation by using the appropriate flag. 253 */ 254 flags = FRAME_NO_RESERVE; 242 if (!reserve_try_alloc(1)) 243 return AS_PF_FAULT; 255 244 } 256 245 257 kpage = km_temporary_page_get(&frame, flags); 258 if (!kpage) 259 return AS_PF_FAULT; 246 kpage = km_temporary_page_get(&frame, FRAME_NO_RESERVE); 260 247 memsetb((void *) kpage, PAGE_SIZE, 0); 261 248 km_temporary_page_put(kpage);
Note:
See TracChangeset
for help on using the changeset viewer.