On Oct 6, 2009, at 7:24 AM, Isaac Marino Bavaresco wrote: > Indeed, your heap must be declared as a normal variable (big array of > char) so the compiler and linker locate it properly. This is the easy way to do things, but of course it won't correct for suddenly switching to a different PIC with more RAM. Compiler/linker combinations are usually pretty good about defining some magic symbols (_edata for gcc, for instance) that indicate the end of the pre- allocated data space. If you combine that with detecting or "knowing" where the stack is, and how much memory actually exists, you can get away without having the array... BillW -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist