Added MEMORY and STACK_SIZE parameters now can be set via external variables FFDEC_MEMORY, FFDEC_STACK_SIZE

This commit is contained in:
Jindra Petřík
2023-11-20 18:44:00 +01:00
parent 31f6cbdb70
commit 0a5eaa102f
3 changed files with 23 additions and 13 deletions

View File

@@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file.
- [#2119] Option to export assets with names like their assigned classes via SymbolClass, without character id
- [#2119] Bulk imported assets can also match filenames based on assigned classname, not just character id prefix
- Debugger shows (logs) unhandled exceptions
- [#2129] MEMORY and STACK_SIZE parameters now can be set via external variables FFDEC_MEMORY, FFDEC_STACK_SIZE
### Fixed
- [#2021], [#2000] Caret position in editors when using tabs and / or unicode
@@ -3296,6 +3297,7 @@ Major version of SWF to XML export changed to 2.
[#2100]: https://www.free-decompiler.com/flash/issues/2100
[#2123]: https://www.free-decompiler.com/flash/issues/2123
[#2119]: https://www.free-decompiler.com/flash/issues/2119
[#2129]: https://www.free-decompiler.com/flash/issues/2129
[#2021]: https://www.free-decompiler.com/flash/issues/2021
[#2000]: https://www.free-decompiler.com/flash/issues/2000
[#2116]: https://www.free-decompiler.com/flash/issues/2116

View File

@@ -1,18 +1,20 @@
@echo off
rem This is a comment, it starts with "rem".
rem Set following to higher value if you want more memory:
rem Uncomment following and set it to higher value if you want more memory:
rem You need 64 bit OS and 64 bit java to set it to higher values
set MEMORY=1024m
rem set FFDEC_MEMORY=1024m
rem Uncomment following when you encounter StackOverFlowErrors.
rem If the app then terminates with OutOfMemory you can experiment with lower value.
rem set STACK_SIZE=32m
rem set FFDEC_STACK_SIZE=32m
rem Hide VLC error output
set VLC_VERBOSE=-1
if not "%STACK_SiZE%"=="" set STACK_SIZE_PARAM= -Xss%STACK_SiZE%
if not "%MEMORY%"=="" set MEMORY_PARAM=-Xmx%MEMORY%
set STACK_SIZE_PARAM=
set MEMORY_PARAM=
if not "%FFDEC_STACK_SiZE%"=="" set STACK_SIZE_PARAM= -Xss%FFDEC_STACK_SiZE%
if not "%FFDEC_MEMORY%"=="" set MEMORY_PARAM=-Xmx%FFDEC_MEMORY%
java %MEMORY_PARAM%%STACK_SIZE_PARAM%-Djna.nosys=true -jar "%~dp0\ffdec.jar" %*
echo %MEMORY_PARAM%%STACK_SIZE_PARAM%-Djna.nosys=true -jar "%~dp0\ffdec.jar" %*

View File

@@ -2,13 +2,13 @@
# This is a comment, it starts with "#".
# Set following to higher value if you want more memory
# Uncomment following and set it to higher value if you want more memory
# You need 64 bit OS and 64 bit java to set it to higher values
MEMORY=1024m
# FFDEC_MEMORY=1024m
# Uncomment following when you encounter StackOverFlowErrors.
# If the app then terminates with OutOfMemory you can experiment with lower value.
# STACK_SIZE=32m
# FFDEC_STACK_SIZE=32m
# Hide VLC error output
export VLC_VERBOSE=-1
@@ -80,11 +80,17 @@ fi
popd > /dev/null
if [ -n "$STACK_SIZE" ]; then
STACK_SIZE_PARAM=" -Xss$STACK_SIZE"
if [ -z ${FFDEC_MEMORY+x} ]; then
FFDEC_MEMORY=1024m
fi
if [ -n "$MEMORY" ]; then
MEMORY_PARAM=" -Xmx$MEMORY"
STACK_SIZE_PARAM=""
MEMORY_PARAM=""
if [ -n "$FFDEC_STACK_SIZE" ]; then
STACK_SIZE_PARAM=" -Xss$FFDEC_STACK_SIZE"
fi
if [ -n "$FFDEC_MEMORY" ]; then
MEMORY_PARAM=" -Xmx$FFDEC_MEMORY"
fi
args=(-Djava.net.preferIPv4Stack=true${MEMORY_PARAM}${STACK_SIZE_PARAM} -jar $JAR_FILE "$@")