Changeset 772 for GPL/trunk/lib32/memory.c
- Timestamp:
- Apr 19, 2025, 8:08:37 PM (4 months ago)
- Location:
- GPL/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
- Property svn:mergeinfo changed
/GPL/branches/uniaud32-6.6-LTS (added) merged: 765,768-769 /GPL/branches/uniaud32-exp (added) merged: 735-741,743-744,748-751,753-760,762-764 /GPL/branches/uniaud32-next merged: 718-734
- Property svn:mergeinfo changed
-
GPL/trunk/lib32/memory.c
r679 r772 424 424 void *__vmalloc(unsigned long size, gfp_t gfp_mask) 425 425 { 426 return vmalloc(size); 426 LINEAR addr; 427 addr = (LINEAR) vmalloc(size); 428 429 if (gfp_mask & __GFP_ZERO) 430 memset((LINEAR)addr, 0, size); 431 432 return addr; 427 433 } 428 434 //****************************************************************************** … … 610 616 611 617 //****************************************************************************** 618 //****************************************************************************** 612 619 #ifdef DEBUGHEAP 613 620 void *__kmalloc(int size, int flags, const char *filename, int lineno) … … 626 633 } 627 634 if(size >= 4096) { 628 returnvmalloc(size);629 } 635 addr = (LINEAR)vmalloc(size); 636 } else { 630 637 #ifdef DEBUGHEAP 631 addr = (LINEAR)malloc(size, filename, lineno);638 addr = (LINEAR)malloc(size, filename, lineno); 632 639 #else 633 addr = (LINEAR)malloc(size);640 addr = (LINEAR)malloc(size); 634 641 #endif 642 } 635 643 if(addr == NULL) { 636 644 DebugInt3(); 637 645 return 0; 638 646 } 647 if (flags & __GFP_ZERO) 648 memset((LINEAR)addr, 0, size); 639 649 //dprintf(("kmalloc %d returned %x", size, addr)); 640 650 return addr; 641 651 } 642 652 653 //****************************************************************************** 643 654 //****************************************************************************** 644 655 #ifdef DEBUGHEAP … … 668 679 669 680 //****************************************************************************** 670 void *kzalloc(size_t size, unsigned int flags)671 {672 void *ret;673 ret = _kmalloc(size, flags);674 if (ret)675 memset(ret, 0, size);676 return ret;677 }678 //******************************************************************************679 681 //****************************************************************************** 680 682 void *kcalloc(size_t n, size_t size, unsigned int flags) … … 773 775 return buf; 774 776 } 777 775 778 //****************************************************************************** 776 779 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.