#undef ENABLE_RESIZE /* define to enable pool resizing */
#define MP_SAFE /* define to made allocator thread safe */
-#define INITIAL_SIZE 65536 /* new pool size */
+#define INITIAL_SIZE 1048576 /* new pool size */
#define MAX_POOLS 32 /* maximum number of pools to setup */
#ifdef ENABLE_RESIZE
void sinit(void)
{
- int ret = add_pool(&mp[0]);
+ int ret;
#ifdef MP_SAFE
- lock = fio_mutex_init(1);
+ lock = fio_mutex_rw_init();
#endif
+ ret = add_pool(&mp[0]);
assert(!ret);
}
do {
if (combine(pool, prv, hdr))
hdr = prv;
-
+
if (hdr_free(hdr) && hdr_size(hdr) >= size)
break;