You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Ken Giusti (Jira)" <ji...@apache.org> on 2020/06/09 12:56:00 UTC

[jira] [Created] (DISPATCH-1685) Provide heap memory allocation wrappers that call abort() on failure to allocate

Ken Giusti created DISPATCH-1685:
------------------------------------

             Summary: Provide heap memory allocation wrappers that call abort() on failure to allocate
                 Key: DISPATCH-1685
                 URL: https://issues.apache.org/jira/browse/DISPATCH-1685
             Project: Qpid Dispatch
          Issue Type: New Feature
            Reporter: Ken Giusti
            Assignee: Ken Giusti


The dispatch router allocates heap memory using the malloc API.  In many cases should a call to malloc fail to return the requested memory the router cannot recover.  In fact there are many places in the code where the return value from a heap allocation call is not even checked for NULL.

This feature would provide a set of wrapper functions for all heap allocation operations used by the router.  These wrapper functions will unconditionally invoke abort() on heap allocation failure.  Note that these are not conditionally compiled out when NDEBUG is defined - abort() is called regardless of build type.

The intent is to use these wrapper functions wherever a heap allocation failure is not recoverable.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org