Go to Post Andy, you have daughters, would you buy them a Dave doll? - MissInformation [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 51 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #19   Spotlight this post!  
Unread 02-03-2015, 19:34
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,186
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Elevator Motion Profiling / PID Ramping

Quote:
Originally Posted by Jared View Post
We don't have any mentors on our team who are familiar with Java or are programmers, so I've been unable to really figure out why System.gc() helps with loop timing.
1) Any object allocations (using the 'new' operator) cannot be assumed to be constant time, as it is basically just mallocing. System.gc is probably just clearing out a portion of memory large enough to not cause the memory allocator to have to look very far to find a spot. We allocate very infrequently and never in control loops to help with this issue.
2) The garbage collector probably won't need to run much within 15 seconds after you explicitly call it. This could be eating CPU.

The real answer is probably to use C/C++.

:-/

Last edited by Tom Bottiglieri : 02-03-2015 at 19:37.
 


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 09:21.

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