Let's say I have the following method (in a class or a module, I don't think it matters):
def someMethod():
pass
I'd like to access the caller's state at the time this method is called.
traceback.extract_stack just gives me some strings about the call stack.
I'd like something like pdb in which I can set a breakpoint in someMeth...
After some experience with functional languages, I'm starting to use recursion more in Java - But the language seems to have a relatively shallow call stack of about 1000.
Is there a way to make the call stack bigger? Like can I make functions that are millions of calls deep, like in Erlang?
I'm noticing this more and more when I do Pr...
Hi all members of stackoverflow, I have a question
What happend when I declare a variable inside a method, for example.
void myMethod() {
Ship myShip = new Ship();
}
Where is allocated myShip reference, in stack or in the heap ?
I think in stack but I'm confused because I was reading in J2ME Game Programming book
"Java classes ...
The following MSIL code loads a single argument (a string), calls a method, which returns bool, and then returns that bool value. What I don't understand is why it calls stloc.0 to store the method's return value in a local variable, then performs an explicit unconditional control transfer to the very next labeled line (seems unnecessar...
Duplicate of http://stackoverflow.com/questions/743545/how-to-allow-more-memory-and-avoid-stack-overflow-on-lots-of-recursion
I'm writing a branch and bound algorithm which has at least 10000 levels by a recursive function,but it doesn't work due to a stack overflow error. here is a simple instance of my program in C++:
void f(int k)
{...
I'm going to build a basic web application, a pretty normal application with a db.
Tell me if this stack seems ok, some of the items I am not familiar with yet, i'm trying to establish a list of technologies/products that I will eventually need:
Spring (note, NO EJBs)
Hibernate
Either Oracle or MySQL (not sure yet which)
ActiveMQ
Flash/...
How do I insert elements of different data types into a single stack in Java?
...
Hello,
There has been one question here which talked about stack growth direction. To which Micahel Burr had replied saying in ARM processors stack growth direction can be configured - i.e. either descending(normal behaviour) stack grows towards zero address(lower address) in memory or descending,i.e. stack grows towards higher address ...
I'd like to cycle (simulate unplug and re-inserting) a USB device (modem) after a certain event has fired. I found a sample on codeproject:
http://www.codeproject.com/KB/system/usbeject.aspx
That allows me to identify+eject the device via its non-volatile serial, but I need it to recycle, not just eject.
I have read this:
http...
Many C/C++/Fortran and other programmers would have come across "stack overflow" errors.
My question is, Is there a tool, a program or a simple code snippet, that allow us to monitor or check the size of the stack while the program is running? This may be helpful to pinpoint where the stack is being accumulated and eventually causing ove...
does some language or platform not have a fixed size of stack and therefore not easy to overflow? I remember using C on UNIX, the stack was difficult to overflow while back in the days of Win 3.1, the stack was very easy to overflow.
...
I've been looking into how programming languages work, and some of them have a so-called virtual machines. I understand that this is some form of emulation of the programming language within another programming language, and that it works like how a compiled language would be executed, with a stack. Did I get that right?
With the provis...
I'm trying to call some functions in a DLL compiled with (I believe) Visual C++ from my program, which is compiled using GCC.
To call the functions in the DLL, I do a LoadLibrary() on the DLL, and then a GetProcAddress() to get the address of a particular function, which I then call. This function returns a list of pointers to the funct...
I want to find out the stack size of .NET thread pool threads in CLR 4.0. Any ideas?
Nick
...
Hi,
I'm writing a small ray tracer using bounding volume hierarchies to accelerate ray tracing.
Long story short, I have a binary tree and I might need to visit multiple leafs.
Current I have a node with two children left and right, then during travel() if some condition, in this example intersect(), the children are visited:
class Bo...
I am thinking of creating a debug tool for my Java application.
I am wondering if it is possible to get a stack trace, just like Exception.printStackTrace() but without actually throwing an exception?
My goal is to in any given method, dump a stack to see who the method caller is.
Any replies or thoughts concerning this would be reall...
What are the possible causes of a stack overflow?
...
Does anyone know some tools to create a call tree for C application that will run on a microcontroller (Cortex-M3)? It could be generated from source code (not ideal), object code (prefered solution), or at runtime (acceptable). I've looked at gprof, but there's still a lot missing to get it to work on an embedded system.
An added bonus...
All,
I need a high speed stack on a .Net CF platform (ARM chip). Does anyone know if the standard (managed) queue classes work well enough for what I describe below? Anyone got an idea on how fast they are? If I do not used managed memory classes what should I use?
The stack will need a maximum size (in megabytes ... 10 or 20 ... so mem...
I have implemented a language under MS Windows that uses cactus stacks to implement
parallel programs. The stack chunks are allocated on a per-function
basis and are just the right size to handle local variables,
expression temp pushes/pops, and calls to libraries (including
stack space for the library routines to work in). Such stack
...