Changeset 7473807 in mainline for kernel/generic/src/mm/backend_phys.c


Ignore:
Timestamp:
2018-05-11T20:22:42Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d2c5159
Parents:
ae89656
Message:

Use atomic malloc allocations

We can safely use atomic allocations in places that use the non-failing
version of malloc(), but test the return value anyway. And also in some
places that can afford to return failure but did not because of comfort.

File:
1 edited

Legend:

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

    rae89656 r7473807  
    160160                phys_shared_data_t *data;
    161161
    162                 data = (phys_shared_data_t *) malloc(sizeof(*data), 0);
     162                data = (phys_shared_data_t *) malloc(sizeof(*data),
     163                    FRAME_ATOMIC);
     164                if (!data)
     165                        return false;
    163166
    164167                data->base = area->backend_data.base;
Note: See TracChangeset for help on using the changeset viewer.