mandrel: add fallback when memory detection fails (e.g. on aarch64).
This commit is contained in:
parent
6b82f6a250
commit
c38ebffb3d
1 changed files with 12 additions and 0 deletions
12
srcpkgs/mandrel/patches/mem.patch
Normal file
12
srcpkgs/mandrel/patches/mem.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
--- a/mandrel-mandrel-21.1.0.0-Final/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/NativeImage.java
|
||||
+++ b/mandrel-mandrel-21.1.0.0-Final/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/NativeImage.java
|
||||
@@ -1829,6 +1829,9 @@
|
||||
if (Long.compareUnsigned(memMax, SubstrateOptionsParser.parseLong(maxXmx)) >= 0) {
|
||||
return maxXmx;
|
||||
}
|
||||
+ if (memMax == 0) {
|
||||
+ return "2g";
|
||||
+ }
|
||||
return Long.toUnsignedString(memMax);
|
||||
}
|
||||
|
Loading…
Reference in a new issue