Shop OBEX P1 Docs P2 Docs Learn Events
Free memory location at run-time — Parallax Forums

Free memory location at run-time

Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
edited 2006-03-12 08:31 in Propeller 1
Is there any way to tell, at run-time, where the "stack/free" area begins in hub RAM?

Thanks,
Phil

Comments

  • cgraceycgracey Posts: 14,133
    edited 2006-03-12 08:04
    To find the start of stack/free, you could just say @result from the initial COG in the initial PUB. That will give you the address of the result variable which is in the dynamic stack area.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-03-12 08:31
    Good, that works. Can I assume, then, that the RAM between @RESULT + 4 and $7FFF is available for any purpose and won't get clobbered, or is it being used somehow? If it's being used, is there a "free zone" within it that's guaranteed not to be?

    Thanks,
    Phil
Sign In or Register to comment.