1
0
Fork 0

try to avoid unnecessary function calls

This commit is contained in:
jsteemann 2016-12-01 14:02:59 +01:00
parent fd327413ba
commit aba74ae1f9
3 changed files with 18 additions and 4 deletions

View File

@ -463,17 +463,17 @@ void TRI_SystemFree(void* p) {
free(p);
}
#ifdef ARANGODB_ENABLE_FAILURE_TESTS
void TRI_AllowMemoryFailures() {
#ifdef ARANGODB_ENABLE_FAILURE_TESTS
AllowMemoryFailures = 1;
#endif
}
#endif
void TRI_DisallowMemoryFailures() {
#ifdef ARANGODB_ENABLE_FAILURE_TESTS
void TRI_DisallowMemoryFailures() {
AllowMemoryFailures = 0;
#endif
}
#endif
/// @brief initialize memory subsystem
void TRI_InitializeMemory() {

View File

@ -139,9 +139,17 @@ void TRI_SystemFreeZ(void*, char const*, int);
void TRI_SystemFree(void*);
#endif
#ifdef ARANGODB_ENABLE_FAILURE_TESTS
void TRI_AllowMemoryFailures();
#else
static inline void TRI_AllowMemoryFailures() {}
#endif
#ifdef ARANGODB_ENABLE_FAILURE_TESTS
void TRI_DisallowMemoryFailures();
#else
static inline void TRI_DisallowMemoryFailures() {}
#endif
/// @brief initialize memory subsystem
void TRI_InitializeMemory(void);

View File

@ -95,8 +95,14 @@ void Version::initialize() {
Values["boost-version"] = getBoostVersion();
Values["build-date"] = getBuildDate();
Values["compiler"] = getCompiler();
#ifdef _DEBUG
Values["debug"] = "true";
#else
Values["debug"] = "false";
#endif
Values["endianness"] = getEndianness();
Values["fd-setsize"] = arangodb::basics::StringUtils::itoa(FD_SETSIZE);
Values["full-version-string"] = ARANGODB_VERSION_FULL;
Values["icu-version"] = getICUVersion();
Values["libev-version"] = getLibevVersion();
Values["openssl-version"] = getOpenSSLVersion();