Add safety checks in relocator and add a GRUB_MM_CHECK macro

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-08-28 21:27:10 +02:00
parent c6785a2380
commit 328951ac24
2 changed files with 38 additions and 1 deletions

View file

@ -35,6 +35,9 @@ void EXPORT_FUNC(grub_free) (void *ptr);
void *EXPORT_FUNC(grub_realloc) (void *ptr, grub_size_t size);
void *EXPORT_FUNC(grub_memalign) (grub_size_t align, grub_size_t size);
void grub_mm_check_real (char *file, int line);
#define GRUB_MM_CHECK grub_mm_check_real (__FILE__, __LINE__);
/* For debugging. */
#if defined(MM_DEBUG) && !defined(GRUB_UTIL) && !defined (GRUB_MACHINE_EMU)
/* Set this variable to 1 when you want to trace all memory function calls. */