Memory Usage

Scubaticus

Active Member
Licensed User
As my app grows, I run into memory problems (program crashes). I want to know more about memory consumpion when possible when a Sub is called to find out which causes this memory consumption.

Is there a way to figure this out?

Scub
 

Scubaticus

Active Member
Licensed User
To be honest, nothing special (I think), but it has probably got something to do the way I do it. Something is eating memory. The program is not crashing immediately, but I have to do a few clicks, but it is reproducible.

I'll take a closer look at it with GCAllocatedMemory to see if I can catch this one. I just need to put the finger on the right spot.

I bet I do sub calling the wrong way with as a result spoiling stack space.
If you are interested, I'll mail you my app and how to crash it, but I can imagine you have more important things to do.

Respect of what you're doing with B4ppc and the courage to share it with us!
It must be a hell of a job!

Scub.
 

Scubaticus

Active Member
Licensed User
The Hardware library GCAllocatedMemory
Sub Globals
Dim somespace(1024)
somespace(0) = 0
End Sub

Sub App_Start
Form1.Show

hw.New1
mem.Text = hw.GCAllocatedMemory
End Sub
Gives me back a zero byte string, but I'm not sure how to use it as it's not in the docs, or in the popup control parm list. Do you have a sample on how to use it correctly?

Scub
 

Scubaticus

Active Member
Licensed User
I managed to capture the error message when the app crashes:

OutOfMemoryException
Application::Run+0xf
class1::Main+0x83

Scub
 

Scubaticus

Active Member
Licensed User
My backup version of the app does not crash. When I'm back at the point I was before the b4ppc crash I'll send you the app (when the problem is still there). A lot of code is lost.....

Scub
 
Top