mirror of
https://github.com/fluencelabs/redis
synced 2025-06-23 22:11:33 +00:00
Jemalloc upgraded to version 5.0.1.
This commit is contained in:
24
deps/jemalloc/test/integration/sdallocx.c
vendored
24
deps/jemalloc/test/integration/sdallocx.c
vendored
@ -1,23 +1,22 @@
|
||||
#include "test/jemalloc_test.h"
|
||||
|
||||
#define MAXALIGN (((size_t)1) << 25)
|
||||
#define NITER 4
|
||||
#define MAXALIGN (((size_t)1) << 22)
|
||||
#define NITER 3
|
||||
|
||||
TEST_BEGIN(test_basic)
|
||||
{
|
||||
TEST_BEGIN(test_basic) {
|
||||
void *ptr = mallocx(64, 0);
|
||||
sdallocx(ptr, 64, 0);
|
||||
}
|
||||
TEST_END
|
||||
|
||||
TEST_BEGIN(test_alignment_and_size)
|
||||
{
|
||||
TEST_BEGIN(test_alignment_and_size) {
|
||||
size_t nsz, sz, alignment, total;
|
||||
unsigned i;
|
||||
void *ps[NITER];
|
||||
|
||||
for (i = 0; i < NITER; i++)
|
||||
for (i = 0; i < NITER; i++) {
|
||||
ps[i] = NULL;
|
||||
}
|
||||
|
||||
for (alignment = 8;
|
||||
alignment <= MAXALIGN;
|
||||
@ -32,8 +31,9 @@ TEST_BEGIN(test_alignment_and_size)
|
||||
ps[i] = mallocx(sz, MALLOCX_ALIGN(alignment) |
|
||||
MALLOCX_ZERO);
|
||||
total += nsz;
|
||||
if (total >= (MAXALIGN << 1))
|
||||
if (total >= (MAXALIGN << 1)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < NITER; i++) {
|
||||
if (ps[i] != NULL) {
|
||||
@ -48,10 +48,8 @@ TEST_BEGIN(test_alignment_and_size)
|
||||
TEST_END
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
main(void) {
|
||||
return test_no_reentrancy(
|
||||
test_basic,
|
||||
test_alignment_and_size));
|
||||
test_alignment_and_size);
|
||||
}
|
||||
|
Reference in New Issue
Block a user