summaryrefslogtreecommitdiffstats
path: root/jemalloc/src/huge.c
diff options
context:
space:
mode:
authorJason Evans <je@fb.com>2011-02-01 04:12:32 (GMT)
committerJason Evans <je@fb.com>2011-02-01 04:12:32 (GMT)
commita73ebd946ab00cacf9bbad6a5edf6aea50c18c0f (patch)
treec010f45dadcf57cd2f2bd67ef5ffba0b03e6e602 /jemalloc/src/huge.c
parent1c4b088b08d3bc7617a34387e196ce03716160bf (diff)
parentada55b2e926dd3200a88cfe5ed84b3ea1d4de25f (diff)
downloadjemalloc-2.1.1.zip
jemalloc-2.1.1.tar.gz
jemalloc-2.1.1.tar.bz2
Merge branch 'dev'2.1.1
Diffstat (limited to 'jemalloc/src/huge.c')
-rw-r--r--jemalloc/src/huge.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/jemalloc/src/huge.c b/jemalloc/src/huge.c
index 0aadc43..de09198 100644
--- a/jemalloc/src/huge.c
+++ b/jemalloc/src/huge.c
@@ -83,7 +83,7 @@ huge_palloc(size_t size, size_t alignment, bool zero)
* alignment, in order to assure the alignment can be achieved, then
* unmap leading and trailing chunks.
*/
- assert(alignment >= chunksize);
+ assert(alignment > chunksize);
chunk_size = CHUNK_CEILING(size);
@@ -192,7 +192,7 @@ huge_ralloc(void *ptr, size_t oldsize, size_t size, size_t extra,
* different size class. In that case, fall back to allocating new
* space and copying.
*/
- if (alignment != 0)
+ if (alignment > chunksize)
ret = huge_palloc(size + extra, alignment, zero);
else
ret = huge_malloc(size + extra, zero);
@@ -201,7 +201,7 @@ huge_ralloc(void *ptr, size_t oldsize, size_t size, size_t extra,
if (extra == 0)
return (NULL);
/* Try again, this time without extra. */
- if (alignment != 0)
+ if (alignment > chunksize)
ret = huge_palloc(size, alignment, zero);
else
ret = huge_malloc(size, zero);