~ubuntu-branches/debian/sid/grub2/sid-200907171837

« back to all changes in this revision

Viewing changes to include/grub/mm.h

  • Committer: Bazaar Package Importer
  • Author(s): Otavio Salvador
  • Date: 2006-06-10 19:57:01 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060610195701-2khcfacexb229tq4
Tags: 1.94-3
Fix FTBFS in amd64. Closes: 372548

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
#include <grub/types.h>
25
25
#include <grub/symbol.h>
 
26
#include <config.h>
26
27
 
27
28
#ifndef NULL
28
29
# define NULL   ((void *) 0)
35
36
void *EXPORT_FUNC(grub_memalign) (grub_size_t align, grub_size_t size);
36
37
 
37
38
/* For debugging.  */
38
 
#define MM_DEBUG       1
39
 
#if MM_DEBUG
 
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);
 
42
 
40
43
void grub_mm_dump (unsigned lineno);
41
 
#endif
 
44
 
 
45
#define grub_malloc(size)       \
 
46
  grub_debug_malloc (__FILE__, __LINE__, size)
 
47
 
 
48
#define grub_realloc(ptr,size)  \
 
49
  grub_debug_realloc (__FILE__, __LINE__, ptr, size)
 
50
 
 
51
#define grub_memalign(align,size)       \
 
52
  grub_debug_memalign (__FILE__, __LINE__, align, size)
 
53
 
 
54
#define grub_free(ptr)  \
 
55
  grub_debug_free (__FILE__, __LINE__, ptr)
 
56
 
 
57
void *EXPORT_FUNC(grub_debug_malloc) (const char *file, int line,
 
58
                                      grub_size_t size);
 
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,
 
61
                                       grub_size_t size);
 
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 */
42
65
 
43
66
#endif /* ! GRUB_MM_H */