Changes in kernel/generic/src/mm/as.c [6785b88b:abf6c01] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/as.c
r6785b88b rabf6c01 141 141 if (!AS_KERNEL) 142 142 panic("Cannot create kernel address space."); 143 144 /*145 * Make sure the kernel address space146 * reference count never drops to zero.147 */148 as_hold(AS_KERNEL);149 143 } 150 144 … … 157 151 as_t *as_create(unsigned int flags) 158 152 { 159 as_t *as = (as_t *) slab_alloc(as_cache, 0); 153 as_t *as = (as_t *) slab_alloc(as_cache, FRAME_ATOMIC); 154 if (!as) 155 return NULL; 156 160 157 (void) as_create_arch(as, 0); 161 158 … … 2243 2240 * 2244 2241 */ 2245 void as_get_area_info(as_t *as, as_area_info_t **obuf, size_t *osize)2242 as_area_info_t *as_get_area_info(as_t *as, size_t *osize) 2246 2243 { 2247 2244 mutex_lock(&as->lock); … … 2251 2248 2252 2249 size_t isize = area_cnt * sizeof(as_area_info_t); 2253 as_area_info_t *info = nfmalloc(isize); 2250 as_area_info_t *info = malloc(isize); 2251 if (!info) { 2252 mutex_unlock(&as->lock); 2253 return NULL; 2254 } 2254 2255 2255 2256 /* Record area data. */ … … 2273 2274 mutex_unlock(&as->lock); 2274 2275 2275 *obuf = info;2276 2276 *osize = isize; 2277 return info; 2277 2278 } 2278 2279
Note: See TracChangeset
for help on using the changeset viewer.