p_realloc(pool_t pool, void *mem, size_t old_size, size_t new_size)
{
if (unlikely(new_size == 0 || new_size > POOL_MAX_ALLOC_SIZE))
- i_panic("Trying to allocate %" PRIuSIZE_T " bytes", new_size);
+ i_panic("Trying to reallocate %" PRIuSIZE_T " -> %" PRIuSIZE_T " bytes",
+ old_size, new_size);
if (mem == NULL)
return pool->v->malloc(pool, new_size);
m2 = p_new(&test_pool, uint32_t, BIG_MAX / sizeof(uint32_t) + 1);
return FATAL_TEST_FAILURE;
case 2: /* grow */
- test_expect_fatal_string("Trying to allocate");
+ test_expect_fatal_string("Trying to reallocate");
m1 = p_realloc_type(&test_pool, m1, uint32max_array_t,
LITTLE_MAX + 2, LITTLE_MAX + 3);
return FATAL_TEST_FAILURE;
case 3:
- test_expect_fatal_string("Trying to allocate");
+ test_expect_fatal_string("Trying to reallocate");
m2 = p_realloc_type(&test_pool, m2, uint32_t,
BIG_MAX / sizeof(uint32_t),
BIG_MAX / sizeof(uint32_t) + 1);
return FATAL_TEST_FAILURE;
case 4: /* shrink */
- test_expect_fatal_string("Trying to allocate");
+ test_expect_fatal_string("Trying to reallocate");
m1 = p_realloc_type(&test_pool, m1, uint32max_array_t,
LITTLE_MAX + 3, LITTLE_MAX + 2);
return FATAL_TEST_FAILURE;
case 5:
- test_expect_fatal_string("Trying to allocate");
+ test_expect_fatal_string("Trying to reallocate");
m2 = p_realloc_type(&test_pool, m2, uint32_t,
BIG_MAX / sizeof(uint32_t) + 2,
BIG_MAX / sizeof(uint32_t) + 1);