Merge remote-tracking branch 'origin/master' into unify-data-types-that-serialized-with-multiple-streams

This commit is contained in:
Alexey Milovidov 2017-11-22 22:02:24 +03:00
commit f3b0f17d50
4 changed files with 13 additions and 5 deletions

View File

@ -7,6 +7,10 @@ endif ()
if (NOT ZLIB_FOUND)
set (USE_INTERNAL_ZLIB_LIBRARY 1)
set (ZLIB_COMPAT 1) # for zlib-ng, also enables WITH_GZFILEOP
set (WITH_NATIVE_INSTRUCTIONS ${ARCHNATIVE})
if (CMAKE_SYSTEM MATCHES "FreeBSD")
set (WITH_OPTIM 0 CACHE INTERNAL "") # Bug in assembler
endif ()
set (ZLIB_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/libzlib-ng" "${ClickHouse_BINARY_DIR}/contrib/libzlib-ng") # generated zconf.h
set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR}) # for poco
set (ZLIB_FOUND 1) # for poco

View File

@ -50,6 +50,10 @@ if (USE_INTERNAL_ZLIB_LIBRARY)
# We should use same defines when including zlib.h as used when zlib compiled
target_compile_definitions (zlib PUBLIC ZLIB_COMPAT WITH_GZFILEOP)
target_compile_definitions (zlibstatic PUBLIC ZLIB_COMPAT WITH_GZFILEOP)
set_target_properties(example PROPERTIES EXCLUDE_FROM_ALL 1)
set_target_properties(example64 PROPERTIES EXCLUDE_FROM_ALL 1)
set_target_properties(minigzip PROPERTIES EXCLUDE_FROM_ALL 1)
set_target_properties(minigzip64 PROPERTIES EXCLUDE_FROM_ALL 1)
endif ()
if (USE_INTERNAL_CCTZ_LIBRARY)

View File

@ -63,5 +63,5 @@ add_executable (integer_hash_tables_and_hashes integer_hash_tables_and_hashes.cp
target_include_directories (integer_hash_tables_and_hashes BEFORE PRIVATE ${SPARCEHASH_INCLUDE_DIR})
target_link_libraries (integer_hash_tables_and_hashes clickhouse_common_io)
add_executable (allocactor allocator.cpp)
target_link_libraries (allocactor dbms)
add_executable (allocator allocator.cpp)
target_link_libraries (allocator clickhouse_common_io)

View File

@ -15,7 +15,7 @@ int main()
p = alloc.realloc(p, old_size, size);
old_size = size;
}
alloc.free(p, size);
alloc.free(p, old_size);
std::cerr << "50mb+50mb+.. ok.\n";
}
@ -38,7 +38,7 @@ int main()
size = old_size;
std::cerr << "ok. impossible catch.\n";
} */
alloc.free(p, size);
alloc.free(p, old_size);
std::cerr << "1gb,512mb,128mb,.. ok.\n";
}
@ -53,7 +53,7 @@ int main()
p = alloc.realloc(p, old_size, size);
old_size = size;
}
alloc.free(p, size);
alloc.free(p, old_size);
std::cerr << "1,2,4,8,..,1G ok.\n";
}