View Single Post
  #2   Spotlight this post!  
Unread 18-08-2009, 16:27
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Dynamic memory MC18

To the best of my recollection, the PIC18 did not support dynamic memory allocation. You always have the option of declaring a big array at global scope and using that area as "scratch" for dynamic memory operations.

You could also dig up some EEPROM code and use that as your "dynamic" memory (Kevin Watson had written a nifty utility to read and write EEPROM). Just be aware that EEPROM is typically much slower than using the stack.

EDIT: I have checked and confirmed; the PIC does not support dynamic memory allocation.

Last edited by Jared Russell : 18-08-2009 at 16:37.