[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-
From: |
Rob Savoye |
Subject: |
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1434-g1a6e0d3 |
Date: |
Mon, 27 Feb 2012 17:58:16 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".
The branch, master has been updated
via 1a6e0d3db2f5495644e8ec3b4dc3e20ca648bfe0 (commit)
from 92f4c91b79f7dc0297edc11f58c5c16e8c7b1b04 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=1a6e0d3db2f5495644e8ec3b4dc3e20ca648bfe0
commit 1a6e0d3db2f5495644e8ec3b4dc3e20ca648bfe0
Author: Rob Savoye <address@hidden>
Date: Mon Feb 27 10:43:27 2012 -0700
Add patch to fix #35635, mmap problems with a hardened kernel.
diff --git a/libbase/jemalloc.c b/libbase/jemalloc.c
index aa6c4c7..077dead 100644
--- a/libbase/jemalloc.c
+++ b/libbase/jemalloc.c
@@ -429,7 +429,7 @@ void *_mmap(void *addr, size_t length, int prot, int flags,
static const bool __isthreaded = true;
#endif
-#if defined(MOZ_MEMORY_SOLARIS) && defined(MAP_ALIGN) &&
!defined(JEMALLOC_NEVER_USES_MAP_ALIGN)
+#if defined(MOZ_MEMORY_SOLARIS) && defined(MAP_ALIGN) &&
!defined(JEMALLOC_NEVER_USES_MAP_ALIGN) || defined(MOZ_MEMORY_LINUX)
#define JEMALLOC_USES_MAP_ALIGN /* Required on Solaris 10. Might
improve performance elsewhere. */
#endif
@@ -2238,6 +2238,7 @@ pages_map_align(size_t size, int pfd, size_t alignment)
* We don't use MAP_FIXED here, because it can cause the *replacement*
* of existing mappings, and we only want to create new mappings.
*/
+#ifdef MOZ_MEMORY_SOLARIS
#ifdef MALLOC_PAGEFILE
if (pfd != -1) {
ret = mmap((void *)alignment, size, PROT_READ | PROT_WRITE,
MAP_PRIVATE |
@@ -2252,6 +2253,31 @@ pages_map_align(size_t size, int pfd, size_t alignment)
if (ret == MAP_FAILED)
ret = NULL;
+#else /* !MOZ_MEMORY_SOLARIS */
+#ifdef MALLOC_PAGEFILE
+ if (pfd != -1) {
+ ret = mmap((void *)alignment, size, PROT_READ | PROT_WRITE,
MAP_PRIVATE |
+ MAP_NOSYNC, pfd, 0);
+ } else
+#endif
+ {
+ ret = mmap(NULL, size + alignment, PROT_READ | PROT_WRITE,
MAP_PRIVATE |
+ MAP_NOSYNC | MAP_ANON, -1, 0);
+ }
+ assert(ret != NULL);
+
+ if (ret == MAP_FAILED)
+ return NULL;
+
+ uintptr_t aligned_ret;
+ size_t extra_size;
+ aligned_ret = (uintptr_t)ret + alignment - 1;
+ aligned_ret &= ~(alignment - 1);
+ extra_size = aligned_ret - (uintptr_t)ret;
+ munmap(ret, extra_size);
+ munmap(ret + extra_size + size, alignment - extra_size);
+ ret = (void*)aligned_ret;
+#endif /* ifdef MOZ_MEMORY_SOLARIS*/
return (ret);
}
#endif
-----------------------------------------------------------------------
Summary of changes:
libbase/jemalloc.c | 28 +++++++++++++++++++++++++++-
1 files changed, 27 insertions(+), 1 deletions(-)
hooks/post-receive
--
Gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1434-g1a6e0d3,
Rob Savoye <=