예제 #1
0
static int
_powerpc64_initvtop(kvm_t *kd)
{

	kd->vmst = (struct vmstate *)_kvm_malloc(kd, sizeof(*kd->vmst));
	if (kd->vmst == NULL)
		return (-1);

	if (powerpc_maphdrs(kd) == -1)
		return (-1);

	return (0);
}
예제 #2
0
int
_kvm_initvtop(kvm_t *kd)
{

	kd->vmst = (struct vmstate *)_kvm_malloc(kd, sizeof(*kd->vmst));
	if (kd->vmst == NULL) {
		_kvm_err(kd, kd->program, "out of virtual memory");
		return (-1);
	}
	if (powerpc_maphdrs(kd) == -1) {
		free(kd->vmst);
		kd->vmst = NULL;
		return (-1);
	}
	return (0);
}