rtpp_zmalloc_memdeb(size_t msize, void *memdeb_p, const char *fname, int linen, const char *funcn) #endif { void *rval; #if !defined(RTPP_CHECK_LEAKS) rval = malloc(msize); #else rval = rtpp_memdeb_malloc(msize, memdeb_p, fname, linen, funcn); #endif if (rval != NULL) { memset(rval, '\0', msize); } return (rval); }
rtpp_wi_malloc_sgnl_memdeb(const char *fname, int linen, const char *funcn, int signum, const void *data, size_t datalen) #endif { struct rtpp_wi *wi; #if !defined(RTPP_CHECK_LEAKS) wi = malloc(sizeof(struct rtpp_wi) + datalen); #else wi = rtpp_memdeb_malloc(sizeof(struct rtpp_wi) + datalen, MEMDEB_SYM, fname, linen, funcn); #endif if (wi == NULL) { return (NULL); } memset(wi, '\0', sizeof(struct rtpp_wi)); wi->free_ptr = wi; wi->wi_type = RTPP_WI_TYPE_SGNL; wi->flags = signum; if (datalen > 0) { wi->msg = wi->data; wi->msg_len = datalen; memcpy(wi->data, data, datalen); } return (wi); }