PICmicro & dsPIC >> PIC W.I.P. (Work In Progress)

Pages: 1
Thad Smith



Reged: Jan 14 2005
Posts: 18
Loc: Colorado
Request: remove single page limit for auto variables
      #47412 - Thu Mar 27 2008 05:17 PM

Currently the single page limit for auto variables requires awkward constructs to effectively use the majority of RAM when large RAM areas would naturally be used for different purposes at different times. Reuse of memory is done naturally with auto variables.

Dynamic memory allocation is often undesirable because of the possible memory fragmentation and pointer use overhead.

Work-arounds are various ad-hoc methods of reusing memory, such as unions, casting buffer pointers to different struct pointers, etc. These are error prone because the user is forced to manually determine usage overlap, in contrast to the analysis that the linker currently does.

Since the PRO version can optimize an entire program at once, allowing this phase of compilation to do the auto variable overlap analysis and assignment using multiple pages would make coding for large programs easier, less error prone, and more efficient. After analysis, page switch commands can then be inserted in the code where needed.

Please consider implementing this enhancement for the PICC-18 compiler.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 1 anonymous users are browsing this forum.

Moderator:  garth, lucky, Andrew L, Ryan 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is enabled
      UBBCode is enabled

Rating:
Topic views: 986

Rate this topic

Jump to

Contact Us | Privacy statement HI-TECH Software

Powered by UBB.threads™ 6.5.5