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.


Dim memory usage


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-21-2008, 03:50 AM
Junior Member
 
Join Date: Mar 2008
Location: Thailand
Posts: 45
Default Dim memory usage

I'm using some potentially quite large arrays in my database program. How much memory is allocated from RAM when you dim an array? How does it differ for different datatypes? Can one free up RAM by using dim arrayname(0)?

Thanks.

The support on this forum is fantastic!!
Reply With Quote
  #2 (permalink)  
Old 07-21-2008, 05:56 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,186
Default

How large are your arrays?
If you don't specify any type for your array it will be a default strings array.
Such array is actually an array of pointers and the memory it uses will increase as you insert new items to the array.
It is better to declare large arrays that only suppose to hold numeric values as Double.

Dim arrayname(0) will free the RAM that this array holds (though not immediately).
Reply With Quote
  #3 (permalink)  
Old 07-21-2008, 09:09 AM
Junior Member
 
Join Date: Mar 2008
Location: Thailand
Posts: 45
Default Ta

Thanks Erel. The arrays were potentially a few hundred thousand records in size. The idea was to extract info from a (very large) text file (the chess .pgn file!), store it in arrays, and then insert it into an SQLite table. But I see now that I can insert the info at the same time as I read the info, one record at a time, or insert it every 1000 records, say.

James
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
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
Memory Usage Scubaticus Questions & Help Needed 6 07-03-2007 06:37 PM


All times are GMT. The time now is 01:17 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0