author | Mike Hommey <mh+mozilla@glandium.org> |
Tue, 19 Dec 2017 14:46:23 +0900 | |
changeset 396806 | 5f4691a291cf811206ee77d40cc1477f54e2f084 |
parent 396805 | 2607c50a69854e349b2ad4916a6294e0bb195a38 |
child 396807 | c76ff8b1c4d4ed78fb0d17f60c467d576e0efba2 |
push id | 33111 |
push user | dluca@mozilla.com |
push date | Tue, 19 Dec 2017 10:06:26 +0000 |
treeherder | mozilla-central@c76ff8b1c4d4 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | njn |
bugs | 1417504, 1280578 |
milestone | 59.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/memory/mozalloc/winheap.cpp +++ b/memory/mozalloc/winheap.cpp @@ -17,16 +17,25 @@ // See mozmemory_wrap.h for more details. This file is part of libmozglue, so // it needs to use _impl suffixes. However, with libmozglue growing, this is // becoming cumbersome, so we will likely use a malloc.h wrapper of some sort // and allow the use of the functions without a _impl suffix. #define MALLOC_DECL(name, return_type, ...) \ MOZ_MEMORY_API return_type name ## _impl(__VA_ARGS__); #define MALLOC_FUNCS MALLOC_FUNCS_MALLOC #include "malloc_decls.h" +#else + +#include <malloc.h> +#define malloc_impl malloc +#define calloc_impl calloc +#define realloc_impl realloc +#define free_impl free + +#endif // Warning: C4273: 'HeapAlloc': inconsistent dll linkage // The Windows headers define HeapAlloc as dllimport, but we define it as // dllexport, which is a voluntary inconsistency. #pragma warning(disable: 4273) MFBT_API LPVOID WINAPI HeapAlloc(_In_ HANDLE hHeap, _In_ DWORD dwFlags, @@ -59,10 +68,8 @@ LPVOID WINAPI HeapReAlloc(_In_ HANDLE hH MFBT_API BOOL WINAPI HeapFree(_In_ HANDLE hHeap, _In_ DWORD dwFlags, _In_ LPVOID lpMem) { free_impl(lpMem); return true; } - -#endif