diff --git a/stasis/util/malloc.h b/stasis/util/malloc.h new file mode 100644 index 0000000..4209cbd --- /dev/null +++ b/stasis/util/malloc.h @@ -0,0 +1,18 @@ +/* + * malloc.h + * + * Created on: Nov 14, 2012 + * Author: sears + */ + +#ifndef MALLOC_H_ +#define MALLOC_H_ + +#include + +#define stasis_malloc(cnt, typ) ((typ*)malloc((cnt)*sizeof(typ))) +#define stasis_calloc(cnt, typ) ((typ*)calloc((cnt),sizeof(typ))) +#define stasis_realloc(ptr, cnt, typ) ((typ*)realloc(ptr, (cnt)*sizeof(typ))) +#define stasis_free(ptr) free(ptr) + +#endif /* MALLOC_H_ */