Commit 12c0bfee authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

Actually use maybe-faster-malloc

git-svn-id: file:///svn/tokudb@132 c7de825b-a66e-492c-adef-691d508d4ae1
parent 3991b8ac
...@@ -19,7 +19,7 @@ int keycompare (bytevec key1b, ITEMLEN key1len, bytevec key2b, ITEMLEN key2len) ...@@ -19,7 +19,7 @@ int keycompare (bytevec key1b, ITEMLEN key1len, bytevec key2b, ITEMLEN key2len)
return 0; return 0;
} }
#elsif 0 #elif 0
int keycompare (bytevec key1, ITEMLEN key1len, bytevec key2, ITEMLEN key2len) { int keycompare (bytevec key1, ITEMLEN key1len, bytevec key2, ITEMLEN key2len) {
if (key1len==key2len) { if (key1len==key2len) {
return memcmp(key1,key2,key1len); return memcmp(key1,key2,key1len);
...@@ -31,7 +31,7 @@ int keycompare (bytevec key1, ITEMLEN key1len, bytevec key2, ITEMLEN key2len) { ...@@ -31,7 +31,7 @@ int keycompare (bytevec key1, ITEMLEN key1len, bytevec key2, ITEMLEN key2len) {
return -keycompare(key2,key2len,key1,key1len); return -keycompare(key2,key2len,key1,key1len);
} }
} }
#elif 1 #elif 0
int keycompare (bytevec key1, ITEMLEN key1len, bytevec key2, ITEMLEN key2len) { int keycompare (bytevec key1, ITEMLEN key1len, bytevec key2, ITEMLEN key2len) {
if (key1len==key2len) { if (key1len==key2len) {
...@@ -53,7 +53,7 @@ int keycompare (bytevec key1, ITEMLEN key1len, bytevec key2, ITEMLEN key2len) { ...@@ -53,7 +53,7 @@ int keycompare (bytevec key1, ITEMLEN key1len, bytevec key2, ITEMLEN key2len) {
const unsigned char *k2; const unsigned char *k2;
for (k1=key1, k2=key2; for (k1=key1, k2=key2;
comparelen>0; comparelen>0;
k1++, k2++) { k1++, k2++, comparelen--) {
if (*k1 != *k2) { if (*k1 != *k2) {
return (int)*k1-(int)*k2; return (int)*k1-(int)*k2;
} }
......
...@@ -1051,6 +1051,7 @@ void test_pma_insert_or_replace(void) { ...@@ -1051,6 +1051,7 @@ void test_pma_insert_or_replace(void) {
void pma_tests (void) { void pma_tests (void) {
memory_check=1; memory_check=1;
test_keycompare(); memory_check_all_free();
test_pma_compare_fun(0); memory_check_all_free(); test_pma_compare_fun(0); memory_check_all_free();
test_pma_compare_fun(1); memory_check_all_free(); test_pma_compare_fun(1); memory_check_all_free();
test_pma_iterate(); test_pma_iterate();
...@@ -1061,7 +1062,6 @@ void pma_tests (void) { ...@@ -1061,7 +1062,6 @@ void pma_tests (void) {
test_pma_find(); memory_check_all_free(); test_pma_find(); memory_check_all_free();
test_calculate_parameters(); memory_check_all_free(); test_calculate_parameters(); memory_check_all_free();
test_count_region(); memory_check_all_free(); test_count_region(); memory_check_all_free();
test_keycompare(); memory_check_all_free();
test_pma_random_pick(); memory_check_all_free(); test_pma_random_pick(); memory_check_all_free();
test_pma_cursor(); memory_check_all_free(); test_pma_cursor(); memory_check_all_free();
test_pma_split(); memory_check_all_free(); test_pma_split(); memory_check_all_free();
......
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