Changeset 7473807 in mainline for kernel/generic/src/console/cmd.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/console/cmd.c

    rae89656 r7473807  
    14651465                return true;
    14661466
    1467         uint64_t *data = (uint64_t *) malloc(sizeof(uint64_t) * cnt, 0);
     1467        uint64_t *data = (uint64_t *) malloc(sizeof(uint64_t) * cnt,
     1468            FRAME_ATOMIC);
    14681469        if (data == NULL) {
    14691470                printf("Error allocating memory for statistics\n");
Note: See TracChangeset for help on using the changeset viewer.