Changeset 11b285d in mainline for kernel/test/cht/cht1.c


Ignore:
Timestamp:
2018-05-13T15:19:32Z (7 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/test/cht/cht1.c

    r13db2044 r11b285d  
    110110
    111111        for (int i = 0; i < val_cnt; ++i)
    112                 v[i] = malloc(sizeof(val_t), 0);
     112                v[i] = nfmalloc(sizeof(val_t));
    113113
    114114        size_t key[] = { 1, 1, 1, 11, 12, 13 };
     
    316316                TPRINTF("I{");
    317317                for (size_t i = 0; i < work->wave_elems; ++i) {
    318                         stress_t *s = malloc(sizeof(stress_t), FRAME_ATOMIC);
     318                        stress_t *s = malloc(sizeof(stress_t));
    319319                        if (!s) {
    320320                                TPRINTF("[out-of-mem]\n");
     
    473473
    474474        TPRINTF("Alloc and init table items. \n");
    475         void *p = malloc(size, FRAME_ATOMIC);
     475        void *p = malloc(size);
    476476        if (!p) {
    477477                TPRINTF("Failed to alloc items\n");
Note: See TracChangeset for help on using the changeset viewer.