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.
|