Bug 1120272 - Expose _aligned_alloc and _aligned_free from mozglue. r=njn

This commit is contained in:
Mike Hommey 2015-01-12 12:20:56 +09:00
parent cc06604267
commit 03b3291d3f
2 changed files with 9 additions and 0 deletions

View File

@ -169,4 +169,10 @@ wcsdup_impl(const wchar_t *src)
wcsncpy(dst, src, len + 1);
return dst;
}
void *
_aligned_malloc(size_t size, size_t alignment)
{
return memalign_impl(alignment, size);
}
#endif /* XP_WIN */

View File

@ -15,6 +15,7 @@ EXPORTS
posix_memalign=posix_memalign_impl
malloc_usable_size=malloc_usable_size_impl
malloc_good_size=malloc_good_size_impl
_aligned_free=free_impl
#else
malloc=je_malloc
calloc=je_calloc
@ -23,7 +24,9 @@ EXPORTS
posix_memalign=je_posix_memalign
malloc_usable_size=je_malloc_usable_size
malloc_good_size=je_malloc_good_size
_aligned_free=je_free
#endif
_aligned_malloc
strndup=wrap_strndup
strdup=wrap_strdup
_strdup=wrap_strdup