summaryrefslogtreecommitdiff
path: root/smalloc.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2008-06-02 09:59:32 +0200
committerJens Axboe <jens.axboe@oracle.com>2008-06-02 09:59:32 +0200
commitb3268b928ec7596a1d294a46a2771c3da789e7d3 (patch)
treec390764d0be10de0c69f31de30993fdc3c50c4bb /smalloc.c
parent0917444531866c9facb0f731eff5e4e28c7c65d3 (diff)
downloadfio-b3268b928ec7596a1d294a46a2771c3da789e7d3.tar.gz
smalloc: use optimized ffz()
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'smalloc.c')
-rw-r--r--smalloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/smalloc.c b/smalloc.c
index 6cbf59cf..0a86c43b 100644
--- 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)