Skip to content
Snippets Groups Projects
Commit e18e26e8 authored by David Parks's avatar David Parks
Browse files

Use tcmalloc for windows (gives auto-magical 16-byte alignment whenever...

Use tcmalloc for windows (gives auto-magical 16-byte alignment whenever needed, much faster than Visual C++ malloc).
parent 90da6d6f
No related branches found
No related tags found
No related merge requests found
......@@ -38,7 +38,7 @@ if (WINDOWS)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /Zi /MDd /MP"
CACHE STRING "C++ compiler debug options" FORCE)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
"${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD /MP /Gm /INCREMENTAL"
"${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD /MP /Gm"
CACHE STRING "C++ compiler release-with-debug options" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD /MP"
......
......@@ -6,7 +6,7 @@ if (STANDALONE)
else (STANDALONE)
use_prebuilt_binary(google)
if (WINDOWS)
use_prebuilt_binary(google-perftools)
use_prebuilt_binary(tcmalloc)
set(TCMALLOC_LIBRARIES
debug libtcmalloc_minimal-debug
optimized libtcmalloc_minimal)
......@@ -29,8 +29,7 @@ if (GOOGLE_PERFTOOLS_FOUND)
endif (GOOGLE_PERFTOOLS_FOUND)
if (WINDOWS)
# *TODO -reenable this once we get server usage sorted out
#set(USE_GOOGLE_PERFTOOLS ON)
set(USE_GOOGLE_PERFTOOLS ON)
endif (WINDOWS)
if (USE_GOOGLE_PERFTOOLS)
......
......@@ -1422,9 +1422,7 @@ if (WINDOWS)
set_target_properties(${VIEWER_BINARY_NAME}
PROPERTIES
# *TODO -reenable this once we get server usage sorted out
#LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS /INCLUDE:\"__tcmalloc\""
LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS"
LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS /INCLUDE:__tcmalloc"
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"
LINK_FLAGS_RELEASE ${release_flags}
)
......@@ -1640,6 +1638,7 @@ if (WINDOWS)
endif (WINDOWS)
target_link_libraries(${VIEWER_BINARY_NAME}
${GOOGLE_PERFTOOLS_LIBRARIES}
${LLAUDIO_LIBRARIES}
${LLCHARACTER_LIBRARIES}
${LLIMAGE_LIBRARIES}
......@@ -1676,7 +1675,6 @@ target_link_libraries(${VIEWER_BINARY_NAME}
${OPENSSL_LIBRARIES}
${CRYPTO_LIBRARIES}
${LLLOGIN_LIBRARIES}
${GOOGLE_PERFTOOLS_LIBRARIES}
${LLCONVEXDECOMP_LIBRARY}
)
......
......@@ -630,12 +630,12 @@
</map>
</map>
</map>
<key>google-perftools</key>
<key>tcmalloc</key>
<map>
<key>copyright</key>
<string>Copyright (c) 2005, Google Inc.</string>
<key>description</key>
<string>Heap performance and validity checking tools from google. Includes TCMalloc, heap-checker, heap-profiler and cpu-profiler.</string>
<string>High performance memory allocator.</string>
<key>license</key>
<string>bsd</string>
<key>packages</key>
......@@ -643,9 +643,9 @@
<key>windows</key>
<map>
<key>md5sum</key>
<string>32dba32ddd460a08e082898ebba6315c</string>
<string>8b11a7d3caee8a4ba70da41d6a5ee131</string>
<key>url</key>
<uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/google-perftools-1.0-windows-20090406.tar.bz2</uri>
<uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/tcmalloc-1.6-windows-20100916b.tar.bz2</uri>
</map>
</map>
</map>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment