Backed out changeset: 91cdefdcd933, to prepair for backout of 8adddabce214 (removal of tcmalloc)
parent
125643ecd5
commit
e8566ec4ea
|
|
@ -109,7 +109,6 @@ set(llcommon_SOURCE_FILES
|
|||
timing.cpp
|
||||
u64.cpp
|
||||
ndintrin.cpp
|
||||
ndallocators.cpp
|
||||
ndmemorypool.cpp
|
||||
)
|
||||
|
||||
|
|
@ -267,7 +266,6 @@ set(llcommon_HEADER_FILES
|
|||
timer.h
|
||||
timing.h
|
||||
u64.h
|
||||
ndallocators.h
|
||||
ndmemorypool.h
|
||||
ndintrin.h
|
||||
ndlocks.h
|
||||
|
|
@ -279,6 +277,10 @@ set_source_files_properties(${llcommon_HEADER_FILES}
|
|||
|
||||
list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
|
||||
|
||||
if(WINDOWS)
|
||||
list(APPEND llcommon_SOURCE_FILES ndallocators.cpp)
|
||||
endif(WINDOWS)
|
||||
|
||||
if(LLCOMMON_LINK_SHARED)
|
||||
add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
|
||||
if(WINDOWS)
|
||||
|
|
|
|||
|
|
@ -27,7 +27,27 @@
|
|||
#define LLMEMORY_H
|
||||
|
||||
#include "llmemtype.h"
|
||||
#include "ndallocators.h"
|
||||
namespace ndAllocators
|
||||
{
|
||||
#ifdef ND_USE_ND_ALLOCS
|
||||
void *ndMalloc( size_t aSize, size_t aAlign );
|
||||
void ndFree( void* ptr );
|
||||
void *ndRealloc( void *ptr, size_t aSize, size_t aAlign );
|
||||
#else
|
||||
inline void *ndMalloc( size_t aSize, size_t aAlign )
|
||||
{
|
||||
return malloc( aSize );
|
||||
}
|
||||
inline void ndFree( void* ptr )
|
||||
{
|
||||
return free( ptr );
|
||||
}
|
||||
void *ndRealloc( void *ptr, size_t aSize, size_t aAlign )
|
||||
{
|
||||
return realloc( ptr, aSize );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if LL_DEBUG
|
||||
inline void* ll_aligned_malloc( size_t size, int align )
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#include <new>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include "ndallocators.h"
|
||||
#include "ndmemorypool.h"
|
||||
|
||||
#ifdef ND_USE_ND_ALLOCS
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ endif (DARWIN)
|
|||
|
||||
set(SLPlugin_SOURCE_FILES
|
||||
slplugin.cpp
|
||||
../../llcommon/ndallocators.cpp
|
||||
)
|
||||
|
||||
if (DARWIN)
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ set(media_plugin_gstreamer010_SOURCE_FILES
|
|||
media_plugin_gstreamer010.cpp
|
||||
llmediaimplgstreamer_syms.cpp
|
||||
llmediaimplgstreamervidplug.cpp
|
||||
../../llcommon/ndallocators.cpp
|
||||
)
|
||||
|
||||
set(media_plugin_gstreamer010_HEADER_FILES
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ endif (DARWIN)
|
|||
|
||||
set(media_plugin_quicktime_SOURCE_FILES
|
||||
media_plugin_quicktime.cpp
|
||||
../../llcommon/ndallocators.cpp
|
||||
)
|
||||
|
||||
add_library(media_plugin_quicktime
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ endif(NOT WORD_SIZE EQUAL 32)
|
|||
|
||||
set(media_plugin_webkit_SOURCE_FILES
|
||||
media_plugin_webkit.cpp
|
||||
../../llcommon/ndallocators.cpp
|
||||
)
|
||||
|
||||
set(media_plugin_webkit_HEADER_FILES
|
||||
|
|
|
|||
|
|
@ -738,6 +738,10 @@ else (HAS_OPENSIM_SUPPORT)
|
|||
)
|
||||
endif (HAS_OPENSIM_SUPPORT)
|
||||
|
||||
if( ND_USE_ND_ALLOCS )
|
||||
list(APPEND viewer_SOURCE_FILES ndallocators.cpp)
|
||||
endif( ND_USE_ND_ALLOCS )
|
||||
|
||||
set(VIEWER_BINARY_NAME "firestorm-bin" CACHE STRING
|
||||
"The name of the viewer executable to create.")
|
||||
|
||||
|
|
|
|||
|
|
@ -23,35 +23,9 @@
|
|||
*/
|
||||
|
||||
|
||||
#ifndef NdAllocators_H
|
||||
#define NdAllocators_H
|
||||
|
||||
|
||||
#include <new>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include "ndmemorypool.h"
|
||||
|
||||
namespace ndAllocators
|
||||
{
|
||||
#ifdef ND_USE_ND_ALLOCS
|
||||
void *ndMalloc( size_t aSize, size_t aAlign );
|
||||
void ndFree( void* ptr );
|
||||
void *ndRealloc( void *ptr, size_t aSize, size_t aAlign );
|
||||
#else
|
||||
inline void *ndMalloc( size_t aSize, size_t aAlign )
|
||||
{
|
||||
return malloc( aSize );
|
||||
}
|
||||
inline void ndFree( void* ptr )
|
||||
{
|
||||
return free( ptr );
|
||||
}
|
||||
void *ndRealloc( void *ptr, size_t aSize, size_t aAlign )
|
||||
{
|
||||
return realloc( ptr, aSize );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif //NdAllocators_H
|
||||
// Yes, that a hack :(
|
||||
// MSVC really complains badly if you do not compiler the pch header into every source files that uses it.
|
||||
// Usage of pch could be disabled for ../llcommon/ndallocators in newview/CMakeLists.txt, but that's even more magic
|
||||
// that needs to be merged when upstream changes CMakeLists.txt
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
#include "../llcommon/ndallocators.cpp"
|
||||
|
|
@ -26,6 +26,7 @@ set(win_crash_logger_SOURCE_FILES
|
|||
win_crash_logger.cpp
|
||||
llcrashloggerwindows.cpp
|
||||
llcrashlookupwindows.cpp
|
||||
../llcommon/ndallocators.cpp
|
||||
)
|
||||
|
||||
set(win_crash_logger_HEADER_FILES
|
||||
|
|
|
|||
Loading…
Reference in New Issue