- Timestamp:
- Sep 7, 2022, 11:35:13 AM (3 years ago)
- Location:
- GPL/branches/uniaud32-next
- Files:
-
- 2 edited
-
include/linux/slab.h (modified) (1 diff)
-
lib32/memory.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-next/include/linux/slab.h
r726 r727 92 92 * @flags: the type of memory to allocate (see kmalloc). 93 93 */ 94 void *kzalloc(size_t n, gfp_t gfp_flags); 94 static inline void *kzalloc(size_t size, gfp_t flags) 95 { 96 return kmalloc(size, flags | __GFP_ZERO); 97 } 98 95 99 void *kcalloc(size_t n, size_t size, unsigned int __nocast gfp_flags); 96 100 void *krealloc(const void *, size_t, gfp_t); -
GPL/branches/uniaud32-next/lib32/memory.c
r726 r727 627 627 } 628 628 if(size >= 4096) { 629 returnvmalloc(size);630 } 629 addr = (LINEAR)vmalloc(size); 630 } else { 631 631 #ifdef DEBUGHEAP 632 addr = (LINEAR)malloc(size, filename, lineno);632 addr = (LINEAR)malloc(size, filename, lineno); 633 633 #else 634 addr = (LINEAR)malloc(size);634 addr = (LINEAR)malloc(size); 635 635 #endif 636 } 636 637 if(addr == NULL) { 637 638 DebugInt3(); … … 671 672 } 672 673 673 //******************************************************************************674 //******************************************************************************675 void *kzalloc(size_t size, unsigned int flags)676 {677 void *ret;678 ret = _kmalloc(size, flags);679 if (ret)680 memset(ret, 0, size);681 return ret;682 }683 674 //****************************************************************************** 684 675 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.
