projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add softrandommap and --alloc-size options
[fio.git]
/
smalloc.c
diff --git
a/smalloc.c
b/smalloc.c
index fd0e9bd05fe81e1a91750933ca4f405937dd3a8a..5baf5a43b711d1a8850a67dd0a39f69e0ee333be 100644
(file)
--- a/
smalloc.c
+++ b/
smalloc.c
@@
-19,8
+19,10
@@
#define INITIAL_SIZE 1048576 /* new pool size */
#define MAX_POOLS 32 /* maximum number of pools to setup */
#define INITIAL_SIZE 1048576 /* new pool size */
#define MAX_POOLS 32 /* maximum number of pools to setup */
+unsigned int smalloc_pool_size = INITIAL_SIZE;
+
#ifdef ENABLE_RESIZE
#ifdef ENABLE_RESIZE
-#define MAX_SIZE 8 *
INITIAL_SIZE
+#define MAX_SIZE 8 *
smalloc_pool_size
static unsigned int resize_error;
#endif
static unsigned int resize_error;
#endif
@@
-229,7
+231,7
@@
static int add_pool(struct pool *pool)
if (fd < 0)
goto out_close;
if (fd < 0)
goto out_close;
- pool->size =
INITIAL_SIZE
;
+ pool->size =
smalloc_pool_size
;
if (ftruncate(fd, pool->size) < 0)
goto out_unlink;
if (ftruncate(fd, pool->size) < 0)
goto out_unlink;