Commit 4495b77a authored by Barry Perlman's avatar Barry Perlman Committed by Yoni Fogel

[t:3092] Avoid function call for common case.

git-svn-id: file:///svn/toku/tokudb@26164 c7de825b-a66e-492c-adef-691d508d4ae1
parent 11d74f29
......@@ -78,7 +78,8 @@ toku_free_n(void* p, size_t size __attribute__((unused)))
void *
toku_xmalloc(size_t size) {
void *r = toku_malloc(size);
resource_assert(r);
if (r == 0) // avoid function call in common case
resource_assert(r);
return r;
}
......@@ -95,7 +96,8 @@ void *
toku_xrealloc(void *v, size_t size)
{
void *r = toku_realloc(v, size);
resource_assert(r);
if (r == 0) // avoid function call in common case
resource_assert(r);
return r;
}
......
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