Changeset 723


Ignore:
Timestamp:
Sep 4, 2022, 11:14:18 AM (3 years ago)
Author:
Paul Smedley
Message:

Update implementation of kzalloc

Location:
GPL/branches/uniaud32-next
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-next/include/linux/slab.h

    r694 r723  
    8787#endif
    8888
    89 void *kzalloc(size_t n, gfp_t gfp_flags);
     89/**
     90 * kzalloc - allocate memory. The memory is set to zero.
     91 * @size: how many bytes of memory are required.
     92 * @flags: the type of memory to allocate (see kmalloc).
     93 */
     94static inline void *kzalloc(size_t size, gfp_t flags)
     95{
     96        return kmalloc(size, flags | __GFP_ZERO);
     97}
     98
    9099void *kcalloc(size_t n, size_t size, unsigned int __nocast gfp_flags);
    91100void *krealloc(const void *, size_t, gfp_t);
  • GPL/branches/uniaud32-next/lib32/memory.c

    r722 r723  
    670670
    671671//******************************************************************************
    672 void *kzalloc(size_t size, unsigned int flags)
    673 {
    674         void *ret;
    675         ret = _kmalloc(size, flags);
    676         if (ret)
    677                 memset(ret, 0, size);
    678         return ret;
    679 }
    680 //******************************************************************************
    681672//******************************************************************************
    682673void *kcalloc(size_t n, size_t size, unsigned int flags)
Note: See TracChangeset for help on using the changeset viewer.