michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifdef MOZ_JEMALLOC3 michael@0: michael@0: #define MOZ_JEMALLOC_IMPL michael@0: michael@0: #include "mozmemory_wrap.h" michael@0: #include "mozilla/Types.h" michael@0: michael@0: /* Override some jemalloc defaults */ michael@0: MFBT_DATA const char * je_(malloc_conf) = "narenas:1,lg_chunk:20"; michael@0: michael@0: #ifdef ANDROID michael@0: #include michael@0: michael@0: static void michael@0: _je_malloc_message(void *cbopaque, const char *s) michael@0: { michael@0: __android_log_print(ANDROID_LOG_INFO, "GeckoJemalloc", "%s", s); michael@0: } michael@0: michael@0: void (*je_(malloc_message))(void *, const char *s) = _je_malloc_message; michael@0: #endif michael@0: michael@0: #endif /* MOZ_JEMALLOC3 */ michael@0: michael@0: /* Provide an abort function for use in jemalloc code */ michael@0: #include michael@0: michael@0: void moz_abort() { michael@0: MOZ_CRASH(); michael@0: }