Changeset 436a0a5 in mainline for kernel/generic/src/mm/as.c


Ignore:
Timestamp:
2018-11-09T22:04:01Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
95d45482
Parents:
88e43bc (diff), abf6c01 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

(merge) Reduce the number of blocking allocations in the kernel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/as.c

    r88e43bc r436a0a5  
    151151as_t *as_create(unsigned int flags)
    152152{
    153         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
    154157        (void) as_create_arch(as, 0);
    155158
     
    22372240 *
    22382241 */
    2239 void as_get_area_info(as_t *as, as_area_info_t **obuf, size_t *osize)
     2242as_area_info_t *as_get_area_info(as_t *as, size_t *osize)
    22402243{
    22412244        mutex_lock(&as->lock);
     
    22452248
    22462249        size_t isize = area_cnt * sizeof(as_area_info_t);
    2247         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        }
    22482255
    22492256        /* Record area data. */
     
    22672274        mutex_unlock(&as->lock);
    22682275
    2269         *obuf = info;
    22702276        *osize = isize;
     2277        return info;
    22712278}
    22722279
Note: See TracChangeset for help on using the changeset viewer.