View Single Post
  #3   Spotlight this post!  
Unread 12-02-2008, 10:27
Dave Scheck's Avatar
Dave Scheck Dave Scheck is offline
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Feb 2003
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 574
Dave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond repute
Re: Dynamic Memory Allocation Woes

One other thing that we've found over the years is that pointer arithmetic on the RC processor is extremely costly. You may want to look at the .lst file that is generated when you build to see how much assembly is generated for pointer operations that you wouldn't bat an eye at on a desktop computer.

You may be better off storing an array of points as opposed to a linked list. If your points are sequential, there's no need to keep anything other than a simple index variable. If you're going to jump around inside the array, you'll need at least a second variable to index to your next point.