Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Memory Usage


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-02-2007, 08:47 PM
Senior Member
 
Join Date: Jun 2007
Location: Netherlands (Arnhem)
Posts: 107
Awards Showcase
Beta Tester 
Total Awards: 1
Default Memory Usage

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
__________________
PPC: IPAQ 2210, 2GB, CF GPS, CF Wireless
Mobile: Samsung Omnia I900 (WM6.1)
Reply With Quote
  #2 (permalink)  
Old 07-02-2007, 09:10 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 4,517
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

The Hardware library GCAllocatedMemory will give the managed memory size.
What is your application loading?
Reply With Quote
  #3 (permalink)  
Old 07-02-2007, 10:06 PM
Senior Member
 
Join Date: Jun 2007
Location: Netherlands (Arnhem)
Posts: 107
Awards Showcase
Beta Tester 
Total Awards: 1
Default

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.
__________________
PPC: IPAQ 2210, 2GB, CF GPS, CF Wireless
Mobile: Samsung Omnia I900 (WM6.1)
Reply With Quote
  #4 (permalink)  
Old 07-02-2007, 10:46 PM
Senior Member
 
Join Date: Jun 2007
Location: Netherlands (Arnhem)
Posts: 107
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by Erel View Post
The Hardware library GCAllocatedMemory
Quote:
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
__________________
PPC: IPAQ 2210, 2GB, CF GPS, CF Wireless
Mobile: Samsung Omnia I900 (WM6.1)
Reply With Quote
  #5 (permalink)  
Old 07-02-2007, 11:40 PM
Senior Member
 
Join Date: Jun 2007
Location: Netherlands (Arnhem)
Posts: 107
Awards Showcase
Beta Tester 
Total Awards: 1
Default

I managed to capture the error message when the app crashes:

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

Scub
__________________
PPC: IPAQ 2210, 2GB, CF GPS, CF Wireless
Mobile: Samsung Omnia I900 (WM6.1)
Reply With Quote
  #6 (permalink)  
Old 07-03-2007, 05:20 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 4,517
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Send me your application and I'll check it.
Reply With Quote
  #7 (permalink)  
Old 07-03-2007, 06:37 PM
Senior Member
 
Join Date: Jun 2007
Location: Netherlands (Arnhem)
Posts: 107
Awards Showcase
Beta Tester 
Total Awards: 1
Default

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
__________________
PPC: IPAQ 2210, 2GB, CF GPS, CF Wireless
Mobile: Samsung Omnia I900 (WM6.1)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dim memory usage JamesC Questions & Help Needed 2 07-21-2008 09:09 AM
Images and memory wolfgang Questions & Help Needed 5 02-23-2008 06:08 PM
Way to decrease memory usage Andrew_572 Questions & Help Needed 3 01-04-2008 10:44 AM
How much memory remains? willisgt Questions & Help Needed 1 12-05-2007 08:55 AM
FormLib: download? Usage? laiyilam Questions & Help Needed 2 09-10-2007 02:53 PM


All times are GMT. The time now is 10:44 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0