TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
TIOBE - C Coding Standard
Search

SR:  14#1Checked automatically with code checker

Synopsis:The dynamic memory allocation functions malloc, realloc and calloc shall not be used directly.
Language:C
Severity Level:3
Category:RESTRICTIONS ON SPECIFIC FUNCTIONS


Description:
For example, malloc has a number of unspecified, undefined and implementation defined areas including the implementation-defined issue of what exactly happens if a request for zero bytes is made. This can be effectively circumvented by providing a function pms_malloc(), for example, which specifically defines what should happen in these circumstances, and may also perform consistency checks absent in many implementations of malloc.The external interface of any such wrapper functions must be consistent with the function being wrapped to avoid a proliferation of slightly different functions.