Changeset 1106 in MondoRescue for trunk/mondo/src/include/mr_mem.h
- Timestamp:
- Feb 7, 2007, 11:55:11 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/src/include/mr_mem.h
r1074 r1106 13 13 #endif 14 14 #include <stdarg.h> 15 #include <stdio.h> 15 16 16 17 /* functions (public methods) */ 17 18 18 extern inline void mr_free(char *allocated); 19 extern inline void mr_allocstr(char *alloc, const char *orig); 20 extern inline void mr_asprintf(char **alloc, const char *fmt, ...); 21 extern inline void mr_getline(char **lineptr, size_t *n, FILE *stream); 22 extern inline void *mr_malloc(size_t size); 19 #define mr_free(x) mr_free_int((void **)&x,__LINE__,__FILE__) 20 #define mr_allocstr(x,y) mr_allocstr_int(x, y,__LINE__,__FILE__) 21 #define mr_asprintf(x,y,args...) mr_asprintf_int(x,__LINE__,__FILE__, y, ## args) 22 #define mr_getline(x,y,z) mr_getline_int(x, y,z,__LINE__,__FILE__) 23 #define mr_malloc(x) mr_malloc_int((size_t)x,__LINE__,__FILE__) 24 25 /* Internal function bringing debuging info 26 * called indirectly through macros */ 27 extern inline void mr_free_int(void **allocated, int line, char *file); 28 extern inline void mr_allocstr_int(char *alloc, const char *orig, int line, char *file); 29 extern inline void mr_asprintf_int(char **alloc, int line, char *file, const char *fmt, ...); 30 extern inline void mr_getline_int(char **lineptr, size_t *n, FILE *stream, int line, char *file); 31 extern inline void *mr_malloc_int(size_t size, int line, char *file); 23 32 24 33 #endif /* MR_MEM_H */
Note:
See TracChangeset
for help on using the changeset viewer.