Changeset 7473807 in mainline for kernel/generic/src/mm/as.c
- Timestamp:
- 2018-05-11T20:22:42Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d2c5159
- Parents:
- ae89656
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/as.c
rae89656 r7473807 620 620 } 621 621 622 as_area_t *area = (as_area_t *) malloc(sizeof(as_area_t), 0); 622 as_area_t *area = (as_area_t *) malloc(sizeof(as_area_t), FRAME_ATOMIC); 623 if (!area) { 624 mutex_unlock(&as->lock); 625 return NULL; 626 } 623 627 624 628 mutex_initialize(&area->lock, MUTEX_PASSIVE); … … 646 650 */ 647 651 if (!(attrs & AS_AREA_ATTR_PARTIAL)) { 648 si = (share_info_t *) malloc(sizeof(share_info_t), 0); 652 si = (share_info_t *) malloc(sizeof(share_info_t), 653 FRAME_ATOMIC); 654 if (!si) { 655 free(area); 656 mutex_unlock(&as->lock); 657 return NULL; 658 } 649 659 mutex_initialize(&si->lock, MUTEX_PASSIVE); 650 660 si->refcount = 1; … … 1292 1302 1293 1303 /* An array for storing frame numbers */ 1294 uintptr_t *old_frame = malloc(used_pages * sizeof(uintptr_t), 0); 1304 uintptr_t *old_frame = malloc(used_pages * sizeof(uintptr_t), 1305 FRAME_ATOMIC); 1306 if (!old_frame) { 1307 mutex_unlock(&area->lock); 1308 mutex_unlock(&as->lock); 1309 return ENOMEM; 1310 } 1295 1311 1296 1312 page_table_lock(as, false);
Note:
See TracChangeset
for help on using the changeset viewer.