Skip to content

Commit

Permalink
core: remove commented out ROUNDUP macro (2002) and big_hash_idx() (2…
Browse files Browse the repository at this point in the history
…007)
  • Loading branch information
henningw committed Jul 20, 2011
1 parent a3d6d80 commit 683a489
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
19 changes: 0 additions & 19 deletions mem/f_malloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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*/
Expand Down Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions mem/q_malloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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*/
Expand Down

0 comments on commit 683a489

Please sign in to comment.