Open frodeseverin opened 1 year ago
When you say it defaults to zero, what do you mean? Where is the default set to zero (in Python? in Java?), and what's the error message you get?
I feel like overriding the JVM's default is not a great idea, and if the JVM has a bad default then that's a serious bug in the JVM.
The default for openjdk on Linux amd64 platforms is 1024k, and I think it's the same on other 64-bit platforms. So 512k would be lower than the default.
It might well make sense to set a higher-than-default stack size if the HTML parser uses a lot of stack space to parse complex documents. The only reason to set an exceptionally low stack size would be if you were spawning a massive number of threads, which I don't think vnu does.
If no value is supplied for stack_size in the constructor it defaults to zero. This makes the JVM call break hard, indicating that a minimum stack size of 512k should be used. At least this is the situation on Windows 10 This PR adds 512k as a default value for stack size if no value is set in the call to the constructor.