Bug 1141079 - Make jemalloc_config.c a C++ source file. r=ted

This commit is contained in:
Mike Hommey 2015-09-02 11:04:42 +09:00
parent 8e38238b27
commit 7c905bcc2e
5 changed files with 17 additions and 6 deletions

View File

@ -3,3 +3,7 @@
# You can obtain one at http://mozilla.org/MPL/2.0/.
STLFLAGS =
# Dummy rule to transition from .c file to .cpp file without a clobber.
# (bug 1005486)
%/jemalloc_config.c: ;

View File

@ -26,19 +26,19 @@
#endif
#define MOZ_MALLOC_OPTIONS "narenas:1,lg_chunk:20,tcache:false"
MFBT_DATA const char * je_(malloc_conf) =
MFBT_DATA const char* je_(malloc_conf) =
MOZ_MALLOC_OPTIONS MOZ_MALLOC_PLATFORM_OPTIONS MOZ_MALLOC_BUILD_OPTIONS;
#ifdef ANDROID
#include <android/log.h>
static void
_je_malloc_message(void *cbopaque, const char *s)
_je_malloc_message(void* cbopaque, const char* s)
{
__android_log_print(ANDROID_LOG_INFO, "GeckoJemalloc", "%s", s);
}
void (*je_(malloc_message))(void *, const char *s) = _je_malloc_message;
void (*je_(malloc_message))(void*, const char* s) = _je_malloc_message;
#endif
#endif /* MOZ_JEMALLOC3 */
@ -46,6 +46,6 @@ void (*je_(malloc_message))(void *, const char *s) = _je_malloc_message;
/* Provide an abort function for use in jemalloc code */
#include <mozilla/Assertions.h>
void moz_abort() {
extern "C" void moz_abort() {
MOZ_CRASH();
}

View File

@ -19,7 +19,7 @@ if CONFIG['MOZ_REPLACE_MALLOC']:
]
SOURCES += [
'jemalloc_config.c',
'jemalloc_config.cpp',
'mozmemory_wrap.c',
]

View File

@ -0,0 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
# Dummy rule to transition from .c file to .cpp file without a clobber.
# (bug 1005486)
%/jemalloc_config.c: ;

View File

@ -5,7 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
SOURCES += [
'../../build/jemalloc_config.c',
'../../build/jemalloc_config.cpp',
'../../build/mozjemalloc_compat.c',
]