diff options
Diffstat (limited to 'sal/rtl/strimp.cxx')
-rw-r--r-- | sal/rtl/strimp.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sal/rtl/strimp.cxx b/sal/rtl/strimp.cxx index d1651a2ad1d7..51a1a94bd705 100644 --- a/sal/rtl/strimp.cxx +++ b/sal/rtl/strimp.cxx @@ -65,11 +65,11 @@ bool rtl_ImplIsWhitespace( sal_Unicode c ) */ static rtl_arena_type *pre_arena = nullptr; -rtl_allocateStringFn rtl_allocateString = rtl_allocateMemory; -rtl_freeStringFn rtl_freeString = rtl_freeMemory; +rtl_allocateStringFn rtl_allocateString = malloc; +rtl_freeStringFn rtl_freeString = free; extern "C" { -static void *pre_allocateStringFn(sal_Size n) +static void *pre_allocateStringFn(size_t n) { sal_Size size = RTL_MEMORY_ALIGN(n + 4, 4); char *addr = static_cast<char*>(rtl_arena_alloc(pre_arena, &size)); @@ -110,8 +110,8 @@ void SAL_CALL rtl_alloc_preInit (sal_Bool start) SAL_THROW_EXTERN_C() else { rtl_arena_foreach(pre_arena, mark_static); - rtl_allocateString = rtl_allocateMemory; - rtl_freeString = rtl_freeMemory; + rtl_allocateString = malloc; + rtl_freeString = free; // TODO: also re-initialize main allocator as well. } |