mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 21:23:06 +00:00
Allow zero sized memalign to pass.
Instead of failing on assertions. Previously the same change was made for posix_memalign and aligned_alloc (#1554). Make memalign behave the same way even though it's obsolete.
This commit is contained in:
@@ -3052,6 +3052,7 @@ je_memalign(size_t alignment, size_t size) {
|
|||||||
static_opts_init(&sopts);
|
static_opts_init(&sopts);
|
||||||
dynamic_opts_init(&dopts);
|
dynamic_opts_init(&dopts);
|
||||||
|
|
||||||
|
sopts.bump_empty_aligned_alloc = true;
|
||||||
sopts.min_alignment = 1;
|
sopts.min_alignment = 1;
|
||||||
sopts.oom_string =
|
sopts.oom_string =
|
||||||
"<jemalloc>: Error allocating aligned memory: out of memory\n";
|
"<jemalloc>: Error allocating aligned memory: out of memory\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user