AnsweredAssumed Answered

qsort in standard library for DSC / MC56F800

Question asked by Colin Cameron on Nov 11, 2015
Latest reply on Dec 11, 2015 by xiangjun.rong

Is the qsort() library function implemented as recursive function or not.


From MISRA 2012, Rule 21.9, page 170


The implementation of qsort is likely to be recursive and will therefore place unknown demands on stack resource. This is of concern in embedded systems as the stack is likely to be a fixed, often small size.


This rule raises a good question. I plan to use this function. As I want to be on the safe side I would like to have this question answered.