projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0917444
)
smalloc: use optimized ffz()
author
Jens Axboe
<jens.axboe@oracle.com>
Mon, 2 Jun 2008 07:59:32 +0000
(09:59 +0200)
committer
Jens Axboe
<jens.axboe@oracle.com>
Mon, 2 Jun 2008 07:59:32 +0000
(09:59 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
smalloc.c
patch
|
blob
|
blame
|
history
diff --git
a/smalloc.c
b/smalloc.c
index 6cbf59cf320a0eb0fcf1bf9166f6b581bfe0c983..0a86c43b0f17d58a5aa69587f92eff1d4f39c279 100644
(file)
--- a/
smalloc.c
+++ b/
smalloc.c
@@
-12,7
+12,7
@@
#include <limits.h>
#include "mutex.h"
-#include "
lib/ffz
.h"
+#include "
arch/arch
.h"
#define MP_SAFE /* define to make thread safe */
#define SMALLOC_REDZONE /* define to detect memory corruption */
@@
-178,7
+178,7
@@
static int find_next_zero(int word, int start)
{
assert(word != -1U);
word >>= (start + 1);
- return
__ffs(~
word) + start + 1;
+ return
ffz(
word) + start + 1;
}
static int add_pool(struct pool *pool, unsigned int alloc_size)