stack-size

Node.js RangeError: Maximum call stack size exceeded

蓝咒 提交于 2020-05-17 07:01:06
问题 I am trying to generate all possible combination of a name from my array productsDeduped and then store the generated combination as productTags array. Here is my code: //function to generate all possible combinations function getCombinations(array) { var i, result = []; for (i = 0; i < array.length; i++) { result.push( array[i], ...getCombinations(array.filter((_, j) => i !== j)).map(v => array[i] + " " + v) ); } return result; } for (var i = 0; i < arrLength; i++) { var productNameStrings =

Python threads stack_size and segfaults

自古美人都是妖i 提交于 2020-01-13 20:21:12
问题 A web crawler script that spawns at most 500 threads and each thread basically requests for certain data served from the remote server, which each server's reply is different in content and size from others. i'm setting stack_size as 756K's for threads threading.stack_size(756*1024) which enables me to have the sufficient number of threads required and complete most of the jobs and requests. But as some servers' responses are bigger than others, and when a thread gets that kind of response,

Computing method call stack size for checking StackOverflowException

北城以北 提交于 2020-01-12 14:07:08
问题 Today morning I answered a question which is related to StackoverflowException . The person has asked when Stackoverflow exception occurs See this link Simplest ways to cause stack overflow in C#, C++ and Java So my question is that is there any method by which we can compute the method call stacks size dynamically in our program and then applying a check before calling a method which checks whether method call stack has space to accommodate it or not to prevent StackOverflowException. As I

Increase stack size of main program or create a new thread with larger stack size for recursive code blocks?

空扰寡人 提交于 2020-01-03 06:43:05
问题 I've a following up question to What is the stack size of a BackgroundWorker DoWork Thread? Is there way to change it? Should I increase the stack size of my main program using the following post build event: "$(DevEnvDir)..\..\VC\bin\editbin.exe" /STACK:8388608 "$(TargetPath)" or should I capsule my recursive code block inside a new thread with a larger stack size? Thread thread = new Thread(delegate() { // do work with larger stack size }, 8192 * 1024); thread.Start(); thread.Join(); The

Unified stack for native and Java in Android Runtime (ART)

牧云@^-^@ 提交于 2020-01-02 11:06:26
问题 https://developer.android.com/guide/practices/verifying-apps-art.html#Stack_Size This document says that the ART has a unified stack for native and Java. Could you tell me what does it mean? I understand that thread's stack-size can be defined only when it is created, e.g. using constructor of Thread class in Java code or pthread API in native code. So I can not understand how does unified stack affect behavior of applications. Please direct me to some good tutorials or snippet throws

Mono, Regex and stack size

眉间皱痕 提交于 2019-12-24 14:03:01
问题 I'm porting a piece of C# software that uses System.Text.RegularExpressions.Regex for parsing out C/C++ includes out of source files. They are fully loaded into memory as a string and then just treated with the regex. It works perfectly on Windows, but Mono running on Linux fails when trying to parse larger files with a stack overflow exception thrown from deep inside System.Text.RegularExpressions.Interpreter . The code is perfectly correct - it works on Windows. Is there a way to increase

increase scala stack size during maven build

北城以北 提交于 2019-12-24 10:23:06
问题 While compiling a scala project using maven (mvn compile) , I am getting error: java.lang.StackOverflowError. I got the same from eclipse as well, but could solve it by giving Additional command line parameters: -J-Xss256m for scala compiler , as given here How to increase scala stack size But I am getting the same error while doing "mvn compile". How can I solve this ? Basically how to increase scala stack size while building via maven 回答1: You can configure the scala-maven-plugin in the pom

What is the stack size of a BackgroundWorker DoWork Thread? Is there way to change it?

人走茶凉 提交于 2019-12-19 10:18:43
问题 I know for a C# main program the stack size 1 MB (32-bit and any) or 4 MB (64-bit), see Why is stack size in C# exactly 1 MB? What is the default stack size of the BackgroundWorker DoWork thread? Is there a way to change the stack size of the BackgroundWorker DoWork thread beside creating another thread like the following example: private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { Thread thread = new Thread(delegate() { // do work with larger stack size }, 8192 * 1024);

Why is stack size in C# exactly 1 MB?

左心房为你撑大大i 提交于 2019-12-17 03:48:05
问题 Today's PCs have a large amount of physical RAM but still, the stack size of C# is only 1 MB for 32-bit processes and 4 MB for 64-bit processes (Stack capacity in C#). Why the stack size in CLR is still so limited? And why is it exactly 1 MB (4 MB) (and not 2 MB or 512 KB)? Why was it decided to use these amounts? I am interested in considerations and reasons behind that decision . 回答1: You are looking at the guy that made that choice. David Cutler and his team selected one megabyte as the