core/win32/os.c
/* see note on is_readable_without_exception for differences between the two
 * returns true if any byte with address from pc to pc+size-1 is not_readable
 * FIXME: reverse the logic to make this is_readable
 * Also CHECK that we actually need this routine
 */
see note on is_readable_without_exception for differences between the two
returns true if any byte with address from pc to pc+size-1 is not_readable
FIXME: reverse the logic to make this is_readable
Also CHECK that we actually need this routine
see note on is_readable_without_exception for differences between the two returns true if any byte with address from pc to pc + size - 1 is not_readable FIXME : reverse the logic to make this is_readable Also CHECK that we actually need this routine
bool
not_readable(byte *pc, size_t size)
{
    MEMORY_BASIC_INFORMATION mbi;
    byte *check_pc = (byte *) ALIGN_BACKWARD(pc, PAGE_SIZE);
    size_t res;
    if (size > (size_t)((byte *)POINTER_MAX - pc))
        size = (byte *)POINTER_MAX - pc;
    while (check_pc != 0 && check_pc < pc+size) {
        res = query_virtual_memory(check_pc, &mbi, sizeof(mbi));
        if (res != sizeof(mbi) || mbi.State == MEM_FREE)
            return true;
        else if (!prot_is_readable(mbi.Protect))
            return true;
        check_pc += PAGE_SIZE;
    }
    return false;
}
bool not_readable ( byte * pc , size_t size ) { MEMORY_BASIC_INFORMATION mbi ; byte * check_pc = ( byte * ) ALIGN_BACKWARD ( pc , PAGE_SIZE ) ; size_t res ; if ( size > ( size_t ) ( ( byte * ) POINTER_MAX - pc ) ) size = ( byte * ) POINTER_MAX - pc ; while ( check_pc != 0 && check_pc < pc + size ) { res = query_virtual_memory ( check_pc , & mbi , sizeof ( mbi ) ) ; if ( res != sizeof ( mbi ) || mbi . State == MEM_FREE ) return true ; else if ( ! prot_is_readable ( mbi . Protect ) ) return true ; check_pc += PAGE_SIZE ; } return false ; }
see note on is_readable_without_exception for differences between the two
 returns true if any byte with address from pc to pc+size-1 is not_readable
 FIXME: reverse the logic to make this is_readable
 Also CHECK that we actually need this routine
see note on is_readable_without_exception for differences between the two returns true if any byte with address from pc to pc + size - 1 is not_readable FIXME : reverse the logic to make this is_readable Also CHECK that we actually need this routine
/*overflow*/