'Perform a fast memory loading of a pointer.
:param int addr: Address to read from.
:return:         A pointer.
:rtype:          int'

def _fast_memory_load_pointer(self, addr):

    pointer_size = (self.project.arch.bits / 8)
    buf = self._fast_memory_load(addr)
    if (self.project.arch.memory_endness == 'Iend_LE'):
        fmt = '<'
    else:
        fmt = '>'
    if (pointer_size == 8):
        fmt += 'Q'
    elif (pointer_size == 4):
        fmt += 'I'
    else:
        raise AngrCFGError('Pointer    size    of    %d    is    not    supported', pointer_size)
    ptr_str = self._ffi.unpack(self._ffi.cast('char*', buf), pointer_size)
    ptr = struct.unpack(fmt, ptr_str)[0]
    return ptr
