You Are Here:

Community: Developer Discussion Boards

#1 Old eye of the garbage collector - 2003-07-25, 10:27

Join Date: Mar 2003
Posts: 31
Location: Denmark
pekkert
Offline
Registered User
hi


i have a problem with the garbage collector (i think ). my graphic routine runs wery well and i can get 15-20 fps from it with out any problems. but sometimes my scroll routine hacks.
i have checked for any lose variables, and everything that could make the GB run.
is there any method for keeping the GB in place.

the small pauses it makes, have a even time interval.

ive tried to put System.gc() calls in my code , at different places but it has no effect.


please help.... im so close to finish
Reply With Quote

#2 Old 2003-07-25, 10:50

Join Date: Jul 2003
Posts: 1,094
Location: Finland, Tampere
doctordwarf
Offline
Super Contributor
pekkert
You can check amount of used/free memory using Runtime like this:

Code:
Runtime rt = java.lang.Runtime.getRuntime();

System.out.println("Total mem: " + rt.totalMemory());
System.out.println("Total free: " + rt.freeMemory());
If you don't use Nokia specific classes, you may find Sun Memory Monitor more convenient. It's included to Wireless Toolkit and will even show you how much memory every object eats
Reply With Quote

#3 Old 2003-07-25, 12:27

Join Date: Jun 2003
Posts: 414
Location: Hungary
kisember
Offline
just a baker
I suggest that make a test version, and in this version draw the free memory and the frame-time on the canvas. It will flickering, but readable, and uesefull. You will see, that you canot avoid GC running. Of course, printing test results makes new strings and a little sophisticated results.
Reply With Quote

#4 Old 2003-07-25, 12:32

Join Date: Mar 2003
Posts: 143
Location: Kluang
yowchuan
Offline
Sony Ericsson Expert
Yah, love the Sun's WTK.

We commented the Nokia's UI API whenever we use Sun's WTK, although it might not be as accurate, but it gives a good idea on how things might work down the road.

Cheers,
YC
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d134434X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ