Re:Tinyalloc: replacement for malloc/free in unmanaged, line...
by CyberDildonics on Sunday January 06, 2019 @09:47PM
(#18842352)
Why would someone be doing this while trying to fit within the boundaries of the MISRA standard? Also what do you mean by module?
[ Parent
| on HN ]
Re:Tinyalloc: replacement for malloc/free in unmanaged, line...
by okl on Sunday January 06, 2019 @10:37PM
(#18842573)
The rule you are referring to is a "required" (not a "mandatory") rule. You can deviate from it and still be MISRA-C compliant. People write deviations for all kinds of reasons. Here are some rationales for deviations:
https://lars-lab.jpl.nasa.gov/JPL_Coding_Standard_C.pdf (Rule 5 on page 10 on malloc)
https://www.keil.com/pack/doc/CMSIS/Core/html/coreMISRA_Exce...
The unit of reuse that defines the type, example: http://c-faq.com/struct/sd1.html
Re:Tinyalloc: replacement for malloc/free in unmanaged, line...
by CyberDildonics on Monday January 07, 2019 @03:34PM
(#18849722)
So your solution, in a thread about using a fixed amount of memory, is to do nothing different and let anything use the heap at any time because it might be possible in some cases to get it past MISRA standards? I'm not really sure of what you are trying to say, it seems you keep skewing further from the original discussion.