Changeset 11b285d in mainline for kernel/generic/src/mm/as.c


Ignore:
Timestamp:
2018-05-13T15:19:32Z (6 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
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)
Message:

Use standard signature for malloc() in kernel.

The remaining instances of blocking allocation are replaced with
a new separate function named nfmalloc (short for non-failing malloc).

File:
1 edited

Legend:

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

    r13db2044 r11b285d  
    620620        }
    621621
    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));
    623623        if (!area) {
    624624                mutex_unlock(&as->lock);
     
    650650         */
    651651        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));
    654653                if (!si) {
    655654                        free(area);
     
    13021301
    13031302        /* 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));
    13061304        if (!old_frame) {
    13071305                mutex_unlock(&area->lock);
     
    22602258
    22612259        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);
    22632261
    22642262        /* Second pass, record data. */
Note: See TracChangeset for help on using the changeset viewer.