Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) 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: 46
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: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
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: 46
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 Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Images and memory wolfgang Questions (Windows Mobile) 5 02-23-2008 06:08 PM
Way to decrease memory usage Andrew_572 Questions (Windows Mobile) 3 01-04-2008 10:44 AM
How much memory remains? willisgt Questions (Windows Mobile) 1 12-05-2007 08:55 AM
FormLib: download? Usage? laiyilam Questions (Windows Mobile) 2 09-10-2007 02:53 PM
Memory Usage Scubaticus Questions (Windows Mobile) 6 07-03-2007 06:37 PM


All times are GMT. The time now is 12:59 AM.


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