Changeset 11b285d in mainline for kernel/generic/src/mm
- Timestamp:
- 2018-05-13T15:19:32Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ad896eb
- Parents:
- 13db2044
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-05-13 14:59:01)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-05-13 15:19:32)
- Location:
- kernel/generic/src/mm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/as.c
r13db2044 r11b285d 620 620 } 621 621 622 as_area_t *area = (as_area_t *) malloc(sizeof(as_area_t) , FRAME_ATOMIC);622 as_area_t *area = (as_area_t *) malloc(sizeof(as_area_t)); 623 623 if (!area) { 624 624 mutex_unlock(&as->lock); … … 650 650 */ 651 651 if (!(attrs & AS_AREA_ATTR_PARTIAL)) { 652 si = (share_info_t *) malloc(sizeof(share_info_t), 653 FRAME_ATOMIC); 652 si = (share_info_t *) malloc(sizeof(share_info_t)); 654 653 if (!si) { 655 654 free(area); … … 1302 1301 1303 1302 /* An array for storing frame numbers */ 1304 uintptr_t *old_frame = malloc(used_pages * sizeof(uintptr_t), 1305 FRAME_ATOMIC); 1303 uintptr_t *old_frame = malloc(used_pages * sizeof(uintptr_t)); 1306 1304 if (!old_frame) { 1307 1305 mutex_unlock(&area->lock); … … 2260 2258 2261 2259 size_t isize = area_cnt * sizeof(as_area_info_t); 2262 as_area_info_t *info = malloc(isize, 0);2260 as_area_info_t *info = nfmalloc(isize); 2263 2261 2264 2262 /* Second pass, record data. */ -
kernel/generic/src/mm/backend_phys.c
r13db2044 r11b285d 160 160 phys_shared_data_t *data; 161 161 162 data = (phys_shared_data_t *) malloc(sizeof(*data), 163 FRAME_ATOMIC); 162 data = (phys_shared_data_t *) malloc(sizeof(*data)); 164 163 if (!data) 165 164 return false; -
kernel/generic/src/mm/slab.c
r13db2044 r11b285d 954 954 } 955 955 956 void *malloc(size_t size, unsigned int flags)956 static void *_malloc(size_t size, unsigned int flags) 957 957 { 958 958 assert(_slab_initialized); … … 967 967 } 968 968 969 void *realloc(void *ptr, size_t size, unsigned int flags) 969 void *malloc(size_t size) 970 { 971 return _malloc(size, FRAME_ATOMIC); 972 } 973 974 /** Non-failing malloc. 975 * Never returns NULL, but may block forever if no memory is available. 976 */ 977 void *nfmalloc(size_t size) 978 { 979 return _malloc(size, 0); 980 } 981 982 static void *_realloc(void *ptr, size_t size, unsigned int flags) 970 983 { 971 984 assert(_slab_initialized); … … 994 1007 } 995 1008 1009 void *realloc(void *ptr, size_t size) 1010 { 1011 return _realloc(ptr, size, FRAME_ATOMIC); 1012 } 1013 996 1014 void free(void *ptr) 997 1015 {
Note:
See TracChangeset
for help on using the changeset viewer.