Commit cc78f6ed authored by marko's avatar marko

Improve Valgrind instrumentation.

rec_offs_set_n_alloc(): Use UNIV_MEM_ASSERT_AND_ALLOC().

UNIV_MEM_ASSERT_AND_ALLOC(): New directive, similar to
UNIV_MEM_ASSERT_AND_FREE().
parent ff8221a8
......@@ -801,6 +801,7 @@ rec_offs_set_n_alloc(
{
ut_ad(offsets);
ut_ad(n_alloc > 0);
UNIV_MEM_ASSERT_AND_ALLOC(offsets, n_alloc * sizeof *offsets);
offsets[0] = n_alloc;
}
......
......@@ -336,5 +336,9 @@ typedef void* os_thread_ret_t;
UNIV_MEM_ASSERT_W(addr, size); \
UNIV_MEM_FREE(addr, size); \
} while (0)
#define UNIV_MEM_ASSERT_AND_ALLOC(addr, size) do { \
UNIV_MEM_ASSERT_W(addr, size); \
UNIV_MEM_ALLOC(addr, size); \
} while (0)
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment