We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Simple question probably..
I have define my heap in the startup.s Heap_Size EQU 0x00001032
In a function I use: void SST25_EditEXTStr(...) { unsigned char *buffer;
buffer = malloc(0x1000);
if (buffer != NULL) {
//do my stuff
free(buffer);
} }
How come I can not set my Heap_Size to 0x00001000. If I do the buffer will be NULL
Thnx
0x1164 would represent an overhead of 0x64 which in decimal is 100 bytes.
But do you really need a heap? Can't your program perform static allocations on startup, i.e. normal zero-initialized variables of potentially large size? Then you will not need any overhead at all, and the linker will not need to link in the heap code.