Go to Post The FIRST community will always step up in times of need. - nikeairmancurry [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 27-06-2014, 22:13
MatthewC529 MatthewC529 is offline
Lcom/mattc/halp;
AKA: Matthew
FRC #1554 (Oceanside Sailors)
Team Role: Mentor
 
Join Date: Feb 2014
Rookie Year: 2013
Location: New York
Posts: 39
MatthewC529 is on a distinguished road
Question Hanging on Memory Query

Out of curiosity has anyone else run into the issue where querying the VM for the current amount of free or total memory leads to the program hanging and possibly printing out numbers with no apparent relation to anything (it could be Total Memory).

It's hard for me to debug and figure out what the issue is since I have tested several things on my end and even just the call itself will lead to it hanging. Is it possible calls to GC are a bad idea in Threads?

I am speaking specifically about

Code:
GC.freeMemory();
GC.totalMemory();
Its unfortunate because it was originally done to scale an algorithms intensiveness based upon the ratio of available memory (And Because arraycopy is awesome, even in Java SE). It isnt necessary but I thought it was interesting. I will keep testing to ensure it isnt on my end but thought I should figure out if anyone else is having the same issue.

I havent tried decompiling Squawk VM yet but I would prefer not to deal with the messiness of decompiling (since I cant find the Squawk VM Source Files) just to see if there is any issue with the GC class itself. Though I doubt it. I mean the people who made are definitely more knowledgeable than I.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
Forum Jump


All times are GMT -5. The time now is 22:39.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi