~hamo/ubuntu/precise/grub2/grub2.hi_res

« back to all changes in this revision

Viewing changes to include/grub/mm.h

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, Colin Watson, Robert Millan, Updated translations
  • Date: 2010-11-22 12:24:56 UTC
  • mfrom: (1.26.4 upstream) (17.3.36 sid)
  • mto: (17.3.43 sid)
  • mto: This revision was merged to the branch mainline in revision 89.
  • Revision ID: james.westby@ubuntu.com-20101122122456-y82z3sfb7k4zfdcc
Tags: 1.99~20101122-1
[ Colin Watson ]
* New Bazaar snapshot.  Too many changes to list in full, but some of the
  more user-visible ones are as follows:
  - GRUB script:
    + Function parameters, "break", "continue", "shift", "setparams",
      "return", and "!".
    + "export" command supports multiple variable names.
    + Multi-line quoted strings support.
    + Wildcard expansion.
  - sendkey support.
  - USB hotunplugging and USB serial support.
  - Rename CD-ROM to cd on BIOS.
  - Add new --boot-directory option to grub-install, grub-reboot, and
    grub-set-default; the old --root-directory option is still accepted
    but was often confusing.
  - Basic btrfs detection/UUID support (but no file reading yet).
  - bash-completion for utilities.
  - If a device is listed in device.map, always assume that it is
    BIOS-visible rather than using extra layers such as LVM or RAID.
  - Add grub-mknetdir script (closes: #550658).
  - Remove deprecated "root" command.
  - Handle RAID devices containing virtio components.
  - GRUB Legacy configuration file support (via grub-menulst2cfg).
  - Keyboard layout support (via grub-mklayout and grub-kbdcomp).
  - Check generated grub.cfg for syntax errors before saving.
  - Pause execution for at most ten seconds if any errors are displayed,
    so that the user has a chance to see them.
  - Support submenus.
  - Write embedding zone using Reed-Solomon, so that it's robust against
    being partially overwritten (closes: #550702, #591416, #593347).
  - GRUB_DISABLE_LINUX_RECOVERY and GRUB_DISABLE_NETBSD_RECOVERY merged
    into a single GRUB_DISABLE_RECOVERY variable.
  - Fix loader memory allocation failure (closes: #551627).
  - Don't call savedefault on recovery entries (closes: #589325).
  - Support triple-indirect blocks on ext2 (closes: #543924).
  - Recognise DDF1 fake RAID (closes: #603354).

[ Robert Millan ]
* Use dpkg architecture wildcards.

[ Updated translations ]
* Slovenian (Vanja Cvelbar).  Closes: #604003
* Dzongkha (dawa pemo via Tenzin Dendup).  Closes: #604102

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
# define NULL   ((void *) 0)
29
29
#endif
30
30
 
31
 
void grub_mm_init_region (void *addr, grub_size_t size, grub_size_t *policies);
 
31
void grub_mm_init_region (void *addr, grub_size_t size);
32
32
void *EXPORT_FUNC(grub_malloc) (grub_size_t size);
33
33
void *EXPORT_FUNC(grub_zalloc) (grub_size_t size);
34
34
void EXPORT_FUNC(grub_free) (void *ptr);
35
35
void *EXPORT_FUNC(grub_realloc) (void *ptr, grub_size_t size);
36
36
void *EXPORT_FUNC(grub_memalign) (grub_size_t align, grub_size_t size);
37
37
 
38
 
void *EXPORT_FUNC(grub_memalign_policy) (grub_size_t align, grub_size_t size,
39
 
                                         int policy);
40
 
 
41
 
void *EXPORT_FUNC(grub_rememalign_policy) (void *ptr, grub_size_t align,
42
 
                                           grub_size_t size, int policy);
43
 
 
44
 
#define GRUB_MM_ALLOCATOR_SKIP     0
45
 
#define GRUB_MM_ALLOCATOR_FIRST  1
46
 
#define GRUB_MM_ALLOCATOR_SECOND 2
47
 
#define GRUB_MM_ALLOCATOR_LAST 3
48
 
 
49
 
#define GRUB_MM_MALLOC_DEFAULT     0
50
 
#define GRUB_MM_MALLOC_KERNEL     1
51
 
 
52
 
/* Number of policies. For alignment reasons must be a multiple of 4.  */
53
 
#define GRUB_MM_NPOLICIES 4
 
38
void grub_mm_check_real (char *file, int line);
 
39
#define GRUB_MM_CHECK grub_mm_check_real (__FILE__, __LINE__);
54
40
 
55
41
/* For debugging.  */
56
 
#if defined(MM_DEBUG) && !defined(GRUB_UTIL)
 
42
#if defined(MM_DEBUG) && !defined(GRUB_UTIL) && !defined (GRUB_MACHINE_EMU)
57
43
/* Set this variable to 1 when you want to trace all memory function calls.  */
58
44
extern int EXPORT_VAR(grub_mm_debug);
59
45
 
61
47
void grub_mm_dump (unsigned lineno);
62
48
 
63
49
#define grub_malloc(size)       \
64
 
  grub_debug_malloc (__FILE__, __LINE__, size)
 
50
  grub_debug_malloc (GRUB_FILE, __LINE__, size)
65
51
 
66
52
#define grub_zalloc(size)       \
67
 
  grub_debug_zalloc (__FILE__, __LINE__, size)
 
53
  grub_debug_zalloc (GRUB_FILE, __LINE__, size)
68
54
 
69
55
#define grub_realloc(ptr,size)  \
70
 
  grub_debug_realloc (__FILE__, __LINE__, ptr, size)
 
56
  grub_debug_realloc (GRUB_FILE, __LINE__, ptr, size)
71
57
 
72
58
#define grub_memalign(align,size)       \
73
 
  grub_debug_memalign (__FILE__, __LINE__, align, size)
 
59
  grub_debug_memalign (GRUB_FILE, __LINE__, align, size)
74
60
 
75
61
#define grub_free(ptr)  \
76
 
  grub_debug_free (__FILE__, __LINE__, ptr)
 
62
  grub_debug_free (GRUB_FILE, __LINE__, ptr)
77
63
 
78
64
void *EXPORT_FUNC(grub_debug_malloc) (const char *file, int line,
79
65
                                      grub_size_t size);