diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2010-04-14 17:53:44 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2010-04-14 17:53:44 -0700 |
commit | dd37cd1a1243fad34d67ea54ebc36fc412da6e88 (patch) | |
tree | bb57682d6e1fe7f93f289df1cf206a29433c1224 /malloc | |
parent | 404a6e32012cfef041709639e13d200ae0b2c0c6 (diff) | |
download | glibc-dd37cd1a1243fad34d67ea54ebc36fc412da6e88.zip glibc-dd37cd1a1243fad34d67ea54ebc36fc412da6e88.tar.gz glibc-dd37cd1a1243fad34d67ea54ebc36fc412da6e88.tar.bz2 |
Optimie x86-64 SSE4 memcmp for unaligned data.
Diffstat (limited to 'malloc')
-rw-r--r-- | malloc/malloc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c index 722b1d4..b067b65 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -3168,6 +3168,10 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av; size = nb + mp_.top_pad + MINSIZE; +#define TWOM (2*1024*1024) + char *cur = (char*)MORECORE(0); + size = (char*)((size_t)(cur + size + TWOM - 1)&~(TWOM-1))-cur; + /* If contiguous, we can subtract out existing space that we hope to combine with new space. We add it back later only if |