19 #include <sys/types.h> 
   32 __must_free static inline void *os_zalloc(
size_t size) {
 
   40 #define os_malloc(s) malloc((s)) 
   44 #define os_realloc(p, s) realloc((p), (s)) 
   48 #define os_calloc(nm, s) calloc((nm), (s)) 
   52 #define os_free(p) free((p)) 
   55 __must_free static inline void *os_realloc_array(
void *ptr, 
size_t nmemb,
 
   57   if (size && nmemb > (~(
size_t)0) / size)
 
   63 #define os_memcpy(d, s, n) memcpy((d), (s), (n)) 
   66 #define os_memmove(d, s, n) memmove((d), (s), (n)) 
   69 #define os_memset(s, c, n) memset(s, c, (n)) 
   72 #define os_memcmp(s1, s2, n) memcmp((s1), (s2), (n)) 
   92 __must_free static inline void *os_memdup(
const void *src, 
size_t len) {
 
#define os_realloc(p, s)
Definition: allocs.h:44
#define os_memcpy(d, s, n)
Definition: allocs.h:63
__must_free char * os_strdup(const char *s)
Definition: allocs.c:21
#define os_malloc(s)
Definition: allocs.h:40
File containing macros for compiler attributes, if they are supported.
#define __must_free
Definition: attributes.h:94