projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fine-grained job level numa control
[fio.git]
/
smalloc.c
diff --git
a/smalloc.c
b/smalloc.c
index 0c7c6df7bdd17992a5fa3c8acb6b53a769621009..d0b6f1e1f0059fb266aac3334d078f36715fbacd 100644
(file)
--- a/
smalloc.c
+++ b/
smalloc.c
@@
-8,6
+8,7
@@
#include <assert.h>
#include <string.h>
#include <unistd.h>
#include <assert.h>
#include <string.h>
#include <unistd.h>
+#include <inttypes.h>
#include <sys/types.h>
#include <limits.h>
#include <fcntl.h>
#include <sys/types.h>
#include <limits.h>
#include <fcntl.h>
@@
-205,7
+206,7
@@
static int add_pool(struct pool *pool, unsigned int alloc_size)
pool->map = ptr;
pool->bitmap = (void *) ptr + (pool->nr_blocks * SMALLOC_BPL);
pool->map = ptr;
pool->bitmap = (void *) ptr + (pool->nr_blocks * SMALLOC_BPL);
- pool->lock = fio_mutex_init(
1
);
+ pool->lock = fio_mutex_init(
FIO_MUTEX_UNLOCKED
);
if (!pool->lock)
goto out_fail;
if (!pool->lock)
goto out_fail;
@@
-253,9
+254,9
@@
void scleanup(void)
#ifdef SMALLOC_REDZONE
static void *postred_ptr(struct block_hdr *hdr)
{
#ifdef SMALLOC_REDZONE
static void *postred_ptr(struct block_hdr *hdr)
{
- u
nsigned long
ptr;
+ u
intptr_t
ptr;
- ptr = (u
nsigned long
) hdr + hdr->size - sizeof(unsigned int);
+ ptr = (u
intptr_t
) hdr + hdr->size - sizeof(unsigned int);
ptr = (ptr + int_mask) & ~int_mask;
return (void *) ptr;
ptr = (ptr + int_mask) & ~int_mask;
return (void *) ptr;