Kaydet (Commit) 550b6bf6 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

rtl_arena_alloc must never obey AMode_SYSTEM

...as e.g. the read+write+exec arena used in
bridges/source/cpp_uno/shared/vtablefactory.cxx has specific requirements on
obtained memory.  This broke recent 8b9968a2
"fdo#72755: Only use double mmap as fallback" for e.g. --enable-ooenv (which
sets G_SLICE).  This is a partial revert of
ce906b80 "skip tricky allocators on
G_SLICE=always-malloc."

Change-Id: I5a5fb7c3c920a7856381e6c55638137c625b5111
üst e60b5899
......@@ -28,8 +28,6 @@
#include <string.h>
#include <stdio.h>
extern AllocMode alloc_mode;
/* ================================================================= *
*
* arena internals.
......@@ -950,9 +948,6 @@ SAL_CALL rtl_arena_alloc (
{
sal_Size size;
if (alloc_mode == AMode_SYSTEM)
return rtl_allocateMemory(*pSize);
size = RTL_MEMORY_ALIGN((*pSize), arena->m_quantum);
if (size > arena->m_qcache_max)
{
......@@ -1022,12 +1017,6 @@ SAL_CALL rtl_arena_free (
{
if (arena != 0)
{
if (alloc_mode == AMode_SYSTEM)
{
rtl_freeMemory(addr);
return;
}
size = RTL_MEMORY_ALIGN(size, arena->m_quantum);
if (size > arena->m_qcache_max)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment