diff options
author | Jukka Jylänki <jujjyl@gmail.com> | 2013-02-12 02:02:57 +0200 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-02-12 02:13:01 +0200 |
commit | 88d88688e48fb393cd04101bef82d140b94d57df (patch) | |
tree | 6606550cd1c812f5629dc3f399d7607053966fdc /tests/dlmalloc_test.c | |
parent | b2dcd0e2b9c9442d29a92d8ffd277df75f03fcaa (diff) |
Skip, or simulate success for the test_dlmalloc test that checks memory allocation linearity/contiguity when compiling it natively to OSX. On that platform, this condition has been detected to not hold. Retain the check still for other platforms.
Diffstat (limited to 'tests/dlmalloc_test.c')
-rw-r--r-- | tests/dlmalloc_test.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/dlmalloc_test.c b/tests/dlmalloc_test.c index 817778bd..fc640d46 100644 --- a/tests/dlmalloc_test.c +++ b/tests/dlmalloc_test.c @@ -42,8 +42,12 @@ int main(int ac, char **av) //printf("zz last: %d\n", (int)last); char *newer = (char*)malloc(512); // should be different //printf("zz newer: %d\n", (int)newer); +#ifndef __APPLE__ c1 += first == last; c2 += first == newer; +#else // On OSX, it's been detected that memory is not necessarily allocated linearly, so skip this check and simulate success. + ++c1; +#endif } printf("*%d,%d*\n", c1, c2); } |