We still have to build and run on 32-bit

Change-Id: Id8840b001beae7de72beace5c0c14f0d304ce1fc
This commit is contained in:
Eike Rathke
2017-10-23 17:44:12 +02:00
parent a646518107
commit 028d66430f

View File

@@ -2816,10 +2816,15 @@ bool ScMatrix::IsSizeAllocatable( SCSIZE nC, SCSIZE nR )
else else
{ {
// GetElementsMax() uses an (~arbitrary) elements limit. // GetElementsMax() uses an (~arbitrary) elements limit.
// Assume 6GB memory could be consumed by matrices.
// The actual allocation depends on the types of individual matrix // The actual allocation depends on the types of individual matrix
// elements and is averaged for type double. // 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; constexpr size_t nMemMax = 0x180000000;
#endif
nElementsMax = GetElementsMax( nMemMax); nElementsMax = GetElementsMax( nMemMax);
} }
bElementsMaxFetched = true; bElementsMaxFetched = true;