def _extract_memories(self):
        def filter(map, elem):
            # 'name' takes precedence over 'id'.
            if 'name' in elem.attrib:
                name = elem.attrib['name']
            elif 'id' in elem.attrib:
                name = elem.attrib['id']
            else:
                # Neither option for memory name was specified, so use the address range.
                try:
                    start = int(elem.attrib['start'], base=0)
                    size = int(elem.attrib['size'], base=0)
                except (KeyError, ValueError):
                    LOG.warning("memory region missing address")
                    return