儲存庫 kBuild 的更動 1859
- 時間撮記:
- 2008-10-13 上午04:52:13 (16 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/kmk/misc.c
r1842 r1859 709 709 710 710 711 #ifdef KMK 712 /* Cache free struct dep to save time in free during snap_deps. 713 free is esp. slow on darwin for some reason. */ 714 static struct dep *free_deps; 715 716 static struct dep * 717 alloc_dep_int (void) 718 { 719 struct dep *d = free_deps; 720 if (d) 721 free_deps = d->next; 722 else 723 d = xmalloc (sizeof (struct dep)); 724 return d; 725 } 726 727 static void 728 free_dep_int (struct dep *d) 729 { 730 d->next = free_deps; 731 free_deps = d; 732 } 733 #endif /* KMK */ 734 735 711 736 /* Allocate a new `struct dep' with all fields initialized to 0. */ 712 737 … … 714 739 alloc_dep () 715 740 { 741 #ifndef KMK 716 742 struct dep *d = xmalloc (sizeof (struct dep)); 743 #else 744 struct dep *d = alloc_dep_int (); 745 #endif 717 746 memset (d, '\0', sizeof (struct dep)); 718 747 return d; … … 725 754 free_dep (struct dep *d) 726 755 { 756 #ifndef KMK 727 757 free (d); 758 #else 759 free_dep_int (d); 760 #endif 728 761 } 729 762 … … 739 772 while (d != 0) 740 773 { 774 #ifndef KMK 741 775 struct dep *c = xmalloc (sizeof (struct dep)); 776 #else 777 struct dep *c = alloc_dep_int (); 778 #endif 742 779 memcpy (c, d, sizeof (struct dep)); 743 780 … … 763 800 struct dep *df = d; 764 801 d = d->next; 802 #ifndef KMK 765 803 free_dep (df); 804 #else 805 free_dep_int (df); 806 #endif 766 807 } 767 808 }
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器