mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 526152: make jemalloc's memalign support alignments less than pointer size, r=pavlov
This commit is contained in:
parent
9a8cd700b7
commit
e1654c8442
@ -5797,14 +5797,14 @@ memalign(size_t alignment, size_t size)
|
||||
{
|
||||
void *ret;
|
||||
|
||||
assert(((alignment - 1) & alignment) == 0 && alignment >=
|
||||
sizeof(void *));
|
||||
assert(((alignment - 1) & alignment) == 0);
|
||||
|
||||
if (malloc_init()) {
|
||||
ret = NULL;
|
||||
goto RETURN;
|
||||
}
|
||||
|
||||
alignment = alignment < sizeof(void*) ? sizeof(void*) : alignment;
|
||||
ret = ipalloc(alignment, size);
|
||||
|
||||
RETURN:
|
||||
|
Loading…
Reference in New Issue
Block a user