mirror of
https://github.com/gperftools/gperftools
synced 2024-12-24 00:02:12 +00:00
tcmalloc_unittest: wrap calloc reference with noopt
It is not clear why we didn't hit this before, but in some cases we see calloc being optimized away (just like we had with new/malloc). And noopt is how we deal with it.
This commit is contained in:
parent
de3066fb1f
commit
9381dd0b19
@ -606,7 +606,7 @@ static void TestHugeAllocations(AllocatorState* rnd) {
|
||||
}
|
||||
|
||||
static void TestCalloc(size_t n, size_t s, bool ok) {
|
||||
char* p = reinterpret_cast<char*>(calloc(n, s));
|
||||
char* p = reinterpret_cast<char*>(noopt(calloc)(n, s));
|
||||
if (FLAGS_verbose)
|
||||
fprintf(LOGSTREAM, "calloc(%zx, %zx): %p\n", n, s, p);
|
||||
if (!ok) {
|
||||
|
Loading…
Reference in New Issue
Block a user