How to set heap size 0 in MCUXpresso IDE

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to set heap size 0 in MCUXpresso IDE

Jump to solution
1,452 Views
zorrotz
Contributor III

Hi,

I´m trying to set size 0 for the heap, but automaticaly it is set to 'default'.

How can I set heap size to 0 or disable the heap?

Thanks

0 Kudos
1 Solution
1,243 Views
lpcxpresso_supp
NXP Employee
NXP Employee

Yes, it looks like the current implementation of the Heap and Stack placement table only allows the heap to be reduced to 4 bytes, rather than 0. But also providing the below function in your application should do the trick:

unsigned __check_heap_overflow (void * new_end_of_heap) {
   return 1; // Heap has overflowed
}

See chapter 12 of the MCUXpresso IDE v10.0.0 User Guide for more details on this function.

Regards,

MCUXpresso IDE Support

View solution in original post

0 Kudos
2 Replies
1,244 Views
lpcxpresso_supp
NXP Employee
NXP Employee

Yes, it looks like the current implementation of the Heap and Stack placement table only allows the heap to be reduced to 4 bytes, rather than 0. But also providing the below function in your application should do the trick:

unsigned __check_heap_overflow (void * new_end_of_heap) {
   return 1; // Heap has overflowed
}

See chapter 12 of the MCUXpresso IDE v10.0.0 User Guide for more details on this function.

Regards,

MCUXpresso IDE Support

0 Kudos
1,243 Views
zorrotz
Contributor III

Thank you

This trick helps.

0 Kudos