kgiusti commented on a change in pull request #757:
URL: https://github.com/apache/qpid-dispatch/pull/757#discussion_r437621702
##########
File path: include/qpid/dispatch/ctools.h
##########
@@ -217,4 +218,41 @@ do { \
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
+//
+// Heap allocation with abort() on failure
+//
+
+static inline void *qd_malloc(size_t size)
Review comment:
Ah - good point. I'm pretty sure there's no zero size use cases, but
I'll add an assert() to enforce that contract.
If size == 0 the caller shouldn't make the call at all, or fall back to
using malloc directly if they're doing something... weird.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]