summaryrefslogtreecommitdiff
path: root/store
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-28 09:09:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-29 09:05:39 +0200
commit37f9fdc11c4e95d6a34cb515a454503256a82c63 (patch)
tree35099c65caf4c62451a5b7a7c0bac249473c9733 /store
parent4c91b89d8ce9c34179f31854dc88bd0a9fa84cba (diff)
replace rtl_allocateMemory with std::malloc
where used directly, since rtl_allocateMemory now just calls into std::malloc Change-Id: I59f85bdb7efdf6baa30e8fcd2370c0f8e9c999ad Reviewed-on: https://gerrit.libreoffice.org/59685 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'store')
-rw-r--r--store/source/lockbyte.cxx4
-rw-r--r--store/source/storbase.hxx4
-rw-r--r--store/source/storbios.cxx6
-rw-r--r--store/source/storcach.cxx6
4 files changed, 10 insertions, 10 deletions
diff --git a/store/source/lockbyte.cxx b/store/source/lockbyte.cxx
index 09240505a7fb..444772e8ff8d 100644
--- a/store/source/lockbyte.cxx
+++ b/store/source/lockbyte.cxx
@@ -690,7 +690,7 @@ MemoryLockBytes::MemoryLockBytes()
MemoryLockBytes::~MemoryLockBytes()
{
- rtl_freeMemory (m_pData);
+ std::free (m_pData);
}
storeError MemoryLockBytes::initialize_Impl (rtl::Reference< PageData::Allocator > & rxAllocator, sal_uInt16 nPageSize)
@@ -776,7 +776,7 @@ storeError MemoryLockBytes::setSize_Impl (sal_uInt32 nSize)
{
if (nSize != m_nSize)
{
- sal_uInt8 * pData = static_cast<sal_uInt8*>(rtl_reallocateMemory (m_pData, nSize));
+ sal_uInt8 * pData = static_cast<sal_uInt8*>(std::realloc (m_pData, nSize));
if (pData != nullptr)
{
if (nSize > m_nSize)
diff --git a/store/source/storbase.hxx b/store/source/storbase.hxx
index 042a467db1b5..accfdf7d73f9 100644
--- a/store/source/storbase.hxx
+++ b/store/source/storbase.hxx
@@ -529,11 +529,11 @@ public:
*/
static void * operator new (size_t n)
{
- return rtl_allocateMemory (sal_uInt32(n));
+ return std::malloc(sal_uInt32(n));
}
static void operator delete (void * p)
{
- rtl_freeMemory (p);
+ std::free (p);
}
/** State.
diff --git a/store/source/storbios.cxx b/store/source/storbios.cxx
index fa76b5cc345d..2ba25fd53e8c 100644
--- a/store/source/storbios.cxx
+++ b/store/source/storbios.cxx
@@ -170,11 +170,11 @@ struct SuperBlockPage
*/
static void * operator new (size_t n)
{
- return rtl_allocateMemory (sal::static_int_cast<sal_Size>(n));
+ return std::malloc(sal::static_int_cast<sal_Size>(n));
}
static void operator delete (void * p)
{
- rtl_freeMemory (p);
+ std::free (p);
}
static void * operator new (SAL_UNUSED_PARAMETER size_t, sal_uInt16 nPageSize)
@@ -183,7 +183,7 @@ struct SuperBlockPage
}
static void operator delete (void * p, SAL_UNUSED_PARAMETER sal_uInt16)
{
- rtl_freeMemory (p);
+ std::free (p);
}
/** Construction.
diff --git a/store/source/storcach.cxx b/store/source/storcach.cxx
index 2f74a872e9d0..a1037095c933 100644
--- a/store/source/storcach.cxx
+++ b/store/source/storcach.cxx
@@ -208,7 +208,7 @@ PageCache::~PageCache()
if (m_hash_table != m_hash_table_0)
{
- rtl_freeMemory (m_hash_table);
+ std::free (m_hash_table);
m_hash_table = m_hash_table_0;
m_hash_size = theTableSize;
m_hash_shift = highbit(m_hash_size) - 1;
@@ -219,7 +219,7 @@ PageCache::~PageCache()
void PageCache::rescale_Impl (std::size_t new_size)
{
std::size_t new_bytes = new_size * sizeof(Entry*);
- Entry ** new_table = static_cast<Entry**>(rtl_allocateMemory(new_bytes));
+ Entry ** new_table = static_cast<Entry**>(std::malloc(new_bytes));
if (new_table != nullptr)
{
@@ -255,7 +255,7 @@ void PageCache::rescale_Impl (std::size_t new_size)
if (old_table != m_hash_table_0)
{
- rtl_freeMemory (old_table);
+ std::free (old_table);
}
}
}