MCU Null pointer

Thread Starter

aamirali

Joined Feb 2, 2012
412


Null pointer points to zero address, also in MCU zero address is special fuction register normally.. Don't they conflict with each other. If I define malloc function & MCU won't be able to allocate memory then malloc return null address,
then what could be the problem.
 

kubeek

Joined Sep 20, 2005
5,795
That is why you allways should check if ptr!=null after allocation. If you don´t do that you´re asking for trouble regardless of MCU or CPU you´re using.
 
Top