From 7de0f850e44fbdd87e1588513e50a7fed3b579f5 Mon Sep 17 00:00:00 2001 From: yuqing Date: Sun, 27 Dec 2015 13:48:10 +0800 Subject: [PATCH] make.sh changed --- make.sh | 6 +++--- src/tests/test_skiplist.c | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/make.sh b/make.sh index c84f7c9..6aece81 100755 --- a/make.sh +++ b/make.sh @@ -120,9 +120,9 @@ fi cd src cp Makefile.in Makefile -sed -i "s/\\\$(CFLAGS)/$CFLAGS/g" Makefile -sed -i "s/\\\$(LIBS)/$LIBS/g" Makefile -sed -i "s/\\\$(LIB_VERSION)/$LIB_VERSION/g" Makefile +sed -i "" "s/\\\$(CFLAGS)/$CFLAGS/g" Makefile +sed -i "" "s/\\\$(LIBS)/$LIBS/g" Makefile +sed -i "" "s/\\\$(LIB_VERSION)/$LIB_VERSION/g" Makefile make $1 $2 $3 if [ "$1" = "clean" ]; then diff --git a/src/tests/test_skiplist.c b/src/tests/test_skiplist.c index f4fb9dd..cae3694 100644 --- a/src/tests/test_skiplist.c +++ b/src/tests/test_skiplist.c @@ -10,7 +10,9 @@ #include "logger.h" #include "shared_func.h" -#define COUNT 1000000 +#define COUNT 10000000 +#define LEVEL_COUNT 18 +#define MIN_ALLOC_ONCE 32 #define LAST_INDEX (COUNT - 1) static int *numbers; @@ -115,7 +117,7 @@ static int test_stable_sort() Record *record; void *value; - result = skiplist_init_ex(&sl, 16, compare_record, 128); + result = skiplist_init_ex(&sl, 12, compare_record, 128); if (result != 0) { return result; } @@ -184,7 +186,7 @@ int main(int argc, char *argv[]) } fast_mblock_manager_init(); - result = skiplist_init_ex(&sl, 12, compare_func, 128); + result = skiplist_init_ex(&sl, LEVEL_COUNT, compare_func, MIN_ALLOC_ONCE); if (result != 0) { return result; }