Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 4f3aa76 in mainline for kernel/generic/src/mm/slab.c


Ignore:
Timestamp:
2018-11-09T22:03:24Z (3 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master
Children:
ba9a150
Parents:
b389f95
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-08 01:26:04)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-09 22:03:24)
Message:

Remove nfmalloc()

File:
1 edited

Legend:

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

    rb389f95 r4f3aa76  
    954954}
    955955
    956 static void *_malloc(size_t size, unsigned int flags)
     956void *malloc(size_t size)
    957957{
    958958        assert(_slab_initialized);
     
    964964        uint8_t idx = fnzb(size - 1) - SLAB_MIN_MALLOC_W + 1;
    965965
    966         return slab_alloc(malloc_caches[idx], flags);
    967 }
    968 
    969 void *malloc(size_t size)
    970 {
    971         return _malloc(size, FRAME_ATOMIC);
    972 }
    973 
    974 /** Non-failing malloc.
    975  *  Never returns NULL, but may block forever if no memory is available.
    976  */
    977 void *nfmalloc(size_t size)
    978 {
    979         return _malloc(size, 0);
    980 }
    981 
    982 static void *_realloc(void *ptr, size_t size, unsigned int flags)
     966        return slab_alloc(malloc_caches[idx], FRAME_ATOMIC);
     967}
     968
     969void *realloc(void *ptr, size_t size)
    983970{
    984971        assert(_slab_initialized);
     
    992979                uint8_t idx = fnzb(size - 1) - SLAB_MIN_MALLOC_W + 1;
    993980
    994                 new_ptr = slab_alloc(malloc_caches[idx], flags);
     981                new_ptr = slab_alloc(malloc_caches[idx], FRAME_ATOMIC);
    995982        } else
    996983                new_ptr = NULL;
     
    1007994}
    1008995
    1009 void *realloc(void *ptr, size_t size)
    1010 {
    1011         return _realloc(ptr, size, FRAME_ATOMIC);
    1012 }
    1013 
    1014996void free(void *ptr)
    1015997{
Note: See TracChangeset for help on using the changeset viewer.