projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
replace 'fill_pattern' with 'cpy_pattern' from 'lib/pattern.c'
[fio.git]
/
smalloc.c
diff --git
a/smalloc.c
b/smalloc.c
index 447d5c55fe3336986c490c068a5f919a100b55cf..8412e7518464d6dbe3e7f218e33e47e855e8e26f 100644
(file)
--- a/
smalloc.c
+++ b/
smalloc.c
@@
-32,7
+32,9
@@
#define SMALLOC_POST_RED 0x5aa55aa5U
unsigned int smalloc_pool_size = INITIAL_SIZE;
#define SMALLOC_POST_RED 0x5aa55aa5U
unsigned int smalloc_pool_size = INITIAL_SIZE;
+#ifdef SMALLOC_REDZONE
static const int int_mask = sizeof(int) - 1;
static const int int_mask = sizeof(int) - 1;
+#endif
struct pool {
struct fio_mutex *lock; /* protects this pool */
struct pool {
struct fio_mutex *lock; /* protects this pool */
@@
-490,13
+492,7
@@
void *smalloc(size_t size)
void *scalloc(size_t nmemb, size_t size)
{
void *scalloc(size_t nmemb, size_t size)
{
- void *ret;
-
- ret = smalloc(nmemb * size);
- if (ret)
- memset(ret, 0, nmemb * size);
-
- return ret;
+ return smalloc(nmemb * size);
}
char *smalloc_strdup(const char *str)
}
char *smalloc_strdup(const char *str)