Module: sip-router Branch: master Commit: 683a4899a992b42d60cc0d45bd10ff197d85dd39 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=683a4899...
Author: Henning Westerholt henning.westerholt@1und1.de Committer: Henning Westerholt henning.westerholt@1und1.de Date: Wed Jul 20 21:34:14 2011 +0200
core: remove commented out ROUNDUP macro (2002) and big_hash_idx() (2007)
---
mem/f_malloc.c | 19 ------------------- mem/q_malloc.c | 5 ----- 2 files changed, 0 insertions(+), 24 deletions(-)
diff --git a/mem/f_malloc.c b/mem/f_malloc.c index 3b4cc9f..9eec13e 100644 --- a/mem/f_malloc.c +++ b/mem/f_malloc.c @@ -81,11 +81,6 @@ #define ROUNDUP(s) (((s)+(ROUNDTO-1))&ROUNDTO_MASK) #define ROUNDDOWN(s) ((s)&ROUNDTO_MASK)
-/* - #define ROUNDUP(s) (((s)%ROUNDTO)?((s)+ROUNDTO)/ROUNDTO*ROUNDTO:(s)) - #define ROUNDDOWN(s) (((s)%ROUNDTO)?((s)-ROUNDTO)/ROUNDTO*ROUNDTO:(s)) -*/ -
/* finds the hash value for s, s=ROUNDTO multiple*/ @@ -169,21 +164,7 @@ inline static int fm_bmp_first_set(struct fm_block* qm, int start)
/* computes hash number for big buckets*/ -#if 0 -inline static unsigned long big_hash_idx(unsigned long s) -{ - unsigned long idx; - /* s is rounded => s = k*2^n (ROUNDTO=2^n) - * index= i such that 2^(i+1) > s >= 2^i - * - * => index = number of the first non null bit in s*/ - idx=sizeof(long)*8-1; - for (; !(s&(1UL<<(sizeof(long)*8-1))) ; s<<=1, idx--); - return idx; -} -#else #define big_hash_idx(s) ((unsigned long)bit_scan_reverse((unsigned long)(s))) -#endif
#ifdef DBG_F_MALLOC diff --git a/mem/q_malloc.c b/mem/q_malloc.c index 88a287c..895cbfc 100644 --- a/mem/q_malloc.c +++ b/mem/q_malloc.c @@ -83,11 +83,6 @@ #define ROUNDUP(s) (((s)+(ROUNDTO-1))&ROUNDTO_MASK) #define ROUNDDOWN(s) ((s)&ROUNDTO_MASK)
-/* -#define ROUNDUP(s) (((s)%ROUNDTO)?((s)+ROUNDTO)/ROUNDTO*ROUNDTO:(s)) -#define ROUNDDOWN(s) (((s)%ROUNDTO)?((s)-ROUNDTO)/ROUNDTO*ROUNDTO:(s)) -*/ -
/* finds the hash value for s, s=ROUNDTO multiple*/