35
36
void *EXPORT_FUNC(grub_memalign) (grub_size_t align, grub_size_t size);
37
38
/* For debugging. */
39
#if defined(MM_DEBUG) && !defined(GRUB_UTIL)
40
/* Set this variable to 1 when you want to trace all memory function calls. */
41
extern int EXPORT_VAR(grub_mm_debug);
40
43
void grub_mm_dump (unsigned lineno);
45
#define grub_malloc(size) \
46
grub_debug_malloc (__FILE__, __LINE__, size)
48
#define grub_realloc(ptr,size) \
49
grub_debug_realloc (__FILE__, __LINE__, ptr, size)
51
#define grub_memalign(align,size) \
52
grub_debug_memalign (__FILE__, __LINE__, align, size)
54
#define grub_free(ptr) \
55
grub_debug_free (__FILE__, __LINE__, ptr)
57
void *EXPORT_FUNC(grub_debug_malloc) (const char *file, int line,
59
void EXPORT_FUNC(grub_debug_free) (const char *file, int line, void *ptr);
60
void *EXPORT_FUNC(grub_debug_realloc) (const char *file, int line, void *ptr,
62
void *EXPORT_FUNC(grub_debug_memalign) (const char *file, int line,
63
grub_size_t align, grub_size_t size);
64
#endif /* MM_DEBUG && ! GRUB_UTIL */
43
66
#endif /* ! GRUB_MM_H */