AnsweredAssumed Answered

Any malloc,calloc,realloc,free causes ERROR L1102: Out of allocation space in CW 10.2

Question asked by paulking on Jan 18, 2017
Latest reply on Feb 6, 2017 by ZhangJennie

I am doing product development using Digi's programmable Xbee radio modem.  Digi's SDK integrates tightly with a "special" version (10.2) of Codewarrior.  If I introduce a line such as: p = calloc(4,sizeof(int)) the linker throws ERROR L1102 and virtually nothing gets allocated memory according to the .map file.  If I comment the calloc out, the program compiles and links with no issues and still plenty of space according to the .map file.  This occurs with malloc, calloc, and free (I assume it will happen with realloc as well but since I can't get anything allocated...).


It has been suggested that I modify LIBDEF_HEAPSIZE in libdefs.h (which defaults to 2000 - way too big as the Xbee only has 2k of ram) and recompile the hs08 libraries.  Unfortunately, this version of CW is license restricted to ridiculously small code sizes and is therefore useless for this purpose.  I have downloaded the trial version of CW 10.7 for MPU to attempt this but it generated a huge number of compile errors I am still trying to sort through - I am not hopeful...