コード例 #1
0
ファイル: maps.c プロジェクト: NimdaKey/trinity
/*
 * Pick a random mapping, and perform some r/w op on it.
 * Called from child on child init, and also periodically
 * from periodic_work()
 */
void dirty_random_mapping(void)
{
	struct map *map;

	map = get_map();
	dirty_mapping(map);
}
コード例 #2
0
ファイル: mremap.c プロジェクト: BwRy/fuzzer-android
/*
 * If we successfully remapped a range, we need to update our record of it
 * so we don't re-use the old address.
 */
static void post_mremap(struct syscallrecord *rec)
{
	void *ptr = (void *) rec->retval;

	if (ptr == MAP_FAILED)
		return;

	map->ptr = ptr;

	/* Sometimes dirty the mapping first. */
	if (rand_bool())
		dirty_mapping(map);
}