summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-10-23 17:44:12 +0200
committerEike Rathke <erack@redhat.com>2017-10-23 17:45:58 +0200
commit028d66430f6b34949b8cd53e0373b5522d17f09c (patch)
treebba9f4a48f973cb13da68ddc70bae962149534fd /sc
parenta646518107097ff64d6d5d26a0fa3e76e98a07f5 (diff)
We still have to build and run on 32-bit
Change-Id: Id8840b001beae7de72beace5c0c14f0d304ce1fc
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/scmatrix.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 32dc362245bd..7139a708e3dc 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -2816,10 +2816,15 @@ bool ScMatrix::IsSizeAllocatable( SCSIZE nC, SCSIZE nR )
else
{
// GetElementsMax() uses an (~arbitrary) elements limit.
- // Assume 6GB memory could be consumed by matrices.
// The actual allocation depends on the types of individual matrix
// elements and is averaged for type double.
+#if SAL_TYPES_SIZEOFPOINTER < 8
+ // Assume 1GB memory could be consumed by matrices.
+ constexpr size_t nMemMax = 0x40000000;
+#else
+ // Assume 6GB memory could be consumed by matrices.
constexpr size_t nMemMax = 0x180000000;
+#endif
nElementsMax = GetElementsMax( nMemMax);
}
bElementsMaxFetched = true;