gasp_anonymous_enum

Suggest preferred locations where to look for available memory

Synopsis:

#include <qvm/gasp.h>
enum {
    GRAM_HINT_RAM = 0x0001,
    GRAM_HINT_ROM = 0x0002,
    GRAM_HINT_ALIGN_TOP = 0x0004
};

Data:

GRAM_HINT_RAM

Look for the requested memory in RAM.

GRAM_HINT_ROM

Look for the requested memory in ROM.

GRAM_HINT_ALIGN_TOP

If possible, allocate the requested memory from the top of the specified region.

Library:

Provided by qvm; no external library is required.

Description:

Use these hints to specify the preferred locations where the gram_find_free() and gram_find_free_range() functions should look for the requested memory.

ALIGN_TOP is used as follows:

If you request, for example, 0x100 bytes of memory without specifying an alignment (ALIGN_TOP isn't set), and memory is available from 0x10000 to 0x1FFFF, the gram_find_free_*() functions will return the lowest valid location: 0x10000.

However, if ALIGN_TOP is set, these functions will return the highest valid location: 0x1FF00 (0x20000 - 0x100).