зеркало из https://github.com/mozilla/gecko-dev.git
Merge m-c to autoland. a=merge
This commit is contained in:
Коммит
76dc33dfb2
|
@ -68,6 +68,7 @@ mozmem_malloc_impl(_ZdaPvRKSt9nothrow_t)(void *ptr)
|
||||||
#undef strndup
|
#undef strndup
|
||||||
#undef strdup
|
#undef strdup
|
||||||
|
|
||||||
|
#ifndef XP_DARWIN
|
||||||
MOZ_MEMORY_API char *
|
MOZ_MEMORY_API char *
|
||||||
strndup_impl(const char *src, size_t len)
|
strndup_impl(const char *src, size_t len)
|
||||||
{
|
{
|
||||||
|
@ -85,6 +86,7 @@ strdup_impl(const char *src)
|
||||||
size_t len = strlen(src);
|
size_t len = strlen(src);
|
||||||
return strndup_impl(src, len);
|
return strndup_impl(src, len);
|
||||||
}
|
}
|
||||||
|
#endif /* XP_DARWIN */
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
|
@ -53,10 +53,11 @@
|
||||||
*
|
*
|
||||||
* - On MacOSX, the system libc has a zone allocator, which allows us to
|
* - On MacOSX, the system libc has a zone allocator, which allows us to
|
||||||
* hook custom malloc implementation functions without exporting them.
|
* hook custom malloc implementation functions without exporting them.
|
||||||
* However, since we want things in Firefox to skip the system zone
|
* The malloc implementation functions are all prefixed with "je_" and used
|
||||||
* allocator, the malloc implementation functions are all exported
|
* this way from the custom zone allocator. They are not exported.
|
||||||
* unprefixed, as well as duplication functions.
|
* Duplication functions are not included, since they will call the custom
|
||||||
* Jemalloc-specific functions are also left unprefixed.
|
* zone allocator anyways. Jemalloc-specific functions are also left
|
||||||
|
* unprefixed.
|
||||||
*
|
*
|
||||||
* - On Android and Gonk, all functions are left unprefixed. Additionally,
|
* - On Android and Gonk, all functions are left unprefixed. Additionally,
|
||||||
* C++ allocation functions (operator new/delete) are also exported and
|
* C++ allocation functions (operator new/delete) are also exported and
|
||||||
|
@ -133,7 +134,7 @@
|
||||||
# define mozmem_jemalloc_impl(a) je_ ## a
|
# define mozmem_jemalloc_impl(a) je_ ## a
|
||||||
# else
|
# else
|
||||||
# define MOZ_JEMALLOC_API MOZ_EXTERN_C MFBT_API
|
# define MOZ_JEMALLOC_API MOZ_EXTERN_C MFBT_API
|
||||||
# if defined(XP_WIN)
|
# if (defined(XP_WIN) || defined(XP_DARWIN))
|
||||||
# if defined(MOZ_REPLACE_MALLOC)
|
# if defined(MOZ_REPLACE_MALLOC)
|
||||||
# define mozmem_malloc_impl(a) a ## _impl
|
# define mozmem_malloc_impl(a) a ## _impl
|
||||||
# else
|
# else
|
||||||
|
|
Загрузка…
Ссылка в новой задаче