[haiku-commits] haiku: hrev53142 - src/system/libroot/posix/rpmalloc

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 17 May 2019 16:37:21 -0400 (EDT)

hrev53142 adds 1 changeset to branch 'master'
old head: dd249016c21ffe708e053b8c746633ad42b4c412
new head: fb683851b1af8bd49198f6706a86adee95acd713
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=fb683851b1af+%5Edd249016c21f

----------------------------------------------------------------------------

fb683851b1af: rpmalloc: Disable assert on failing to map memory.
  
  We want applications to be able to handle out-of-memory
  conditions gracefully, not just trigger an assert every time.
  I disabled this before, looks like I missed it in the final
  patch.

                              [ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53142
Commit:      fb683851b1af8bd49198f6706a86adee95acd713
URL:         https://git.haiku-os.org/haiku/commit/?id=fb683851b1af
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Fri May 17 20:35:58 2019 UTC

----------------------------------------------------------------------------

1 file changed, 2 insertions(+)
src/system/libroot/posix/rpmalloc/rpmalloc.cpp | 2 ++

----------------------------------------------------------------------------

diff --git a/src/system/libroot/posix/rpmalloc/rpmalloc.cpp 
b/src/system/libroot/posix/rpmalloc/rpmalloc.cpp
index 0be1619220..aeddc71349 100644
--- a/src/system/libroot/posix/rpmalloc/rpmalloc.cpp
+++ b/src/system/libroot/posix/rpmalloc/rpmalloc.cpp
@@ -1726,7 +1726,9 @@ _memory_map_os(size_t size, size_t* offset) {
        void* ptr = mmap(0, size + padding, PROT_READ | PROT_WRITE, MAP_PRIVATE 
| MAP_ANONYMOUS | MAP_UNINITIALIZED, -1, 0);
 #  endif
        if ((ptr == MAP_FAILED) || !ptr) {
+#ifndef __HAIKU__
                assert("Failed to map virtual memory block" == 0);
+#endif
                return 0;
        }
 #endif


Other related posts:

  • » [haiku-commits] haiku: hrev53142 - src/system/libroot/posix/rpmalloc - waddlesplash