Stack overflows from deep recursion in Java?
I guess you could use these parameters
-ss Stacksize to increase the native
stack size or-oss Stacksize to increase the Java
stack size,The default native stack size is 128k,
with a minimum value of 1000 bytes.
The default java stack size is 400k,
with a minimum value of 1000 bytes.
http://edocs.bea.com/wls/docs61/faq/java.html#251197
EDIT:
After reading the first comment (Chuck´s), as well as re reading the question and reading another answers, i´d like to clarify that i interpreted the question as just "increase stack size". I didn´t intend to say that you can have infinite stacks, such as in functional programming (a programming paradigm which i´ve only scratched its surface).
Recursive call stack depth
This is my mistake again... the setting for the Java stack is -Xss (the -Xms setting is the starting heap size), sorry. So if you use the JVM Arguments section in the Debugger tab of the launcher, and set something like -Xss5m, you should get further.
In a simple experiment with a recursive function, the default stack allowed me a depth of 227 calls. Using -Xss5m gave me 4020 calls, and -Xss10m gave me 8050 calls. Note that these stack sizes are somewhat less that the Gb sizes you were trying - 5Mb of stack is a lot of calls!
Add-Recursion in Java, why ist the maximum so low?
Each recursive call will allocate a stack frame. Thus, you run out of stack space.
Related Topics
How to Change Size of Title's Text on Action Bar
Android - How to Create Clickable Listview
Click Is Not Working on the Listitem Listview Android
Cannot Resolve Method Getmap()
Polyline Is Not on the Roads: It Goes Straight from One Point to Other
How to Transform Currenttimemillis to a Readable Date Format
Preload Multiple Images with Glide
Google Maps API and Custom Polyline Route Between Markers
Simple Date Format Returns Wrong Date Intermittently
Android Buildscript Repositories: Jcenter VS Mavencentral
How to Activate "Share" Button in Android App
Why Do Variable Names Often Start with the Letter 'M'
Networksecurityconfig: No Network Security Config Specified -- Android 7.0 Error
Automatically Log Android Lifecycle Events Using Activitylifecyclecallbacks
How to Remove Only Trailing Spaces of a String in Java and Keep Leading Spaces