DPRINTF(("break(1): old %x new %x diff %x\n", old, new, diff));
DPRINTF(("break(1): old %lx new %lx diff %x\n", old, new, diff));
svr4_sys_break(p, v, retval)	register struct proc *p;	void *v;	register_t *retval;{	struct svr4_sys_break_args *uap = v;	register struct vmspace *vm = p->p_vmspace;	vm_offset_t     new, old;	int             rv;	register int    diff;	old = (vm_offset_t) vm->vm_daddr;	new = round_page(SCARG(uap, nsize));	diff = new - old;	DPRINTF(("break(1): old %x new %x diff %x\n", old, new, diff));	if (diff > p->p_rlimit[RLIMIT_DATA].rlim_cur)		return ENOMEM;	old = round_page(old + ctob(vm->vm_dsize));	DPRINTF(("break(2): dsize = %x ctob %x\n",		 vm->vm_dsize, ctob(vm->vm_dsize)));	diff = new - old;	DPRINTF(("break(3): old %x new %x diff %x\n", old, new, diff));	if (diff > 0) {		rv = vm_allocate(&vm->vm_map, &old, diff, FALSE);		if (rv != KERN_SUCCESS) {			uprintf("sbrk: grow failed, return = %d\n", rv);			return ENOMEM;		}		vm->vm_dsize += btoc(diff);	} else if (diff < 0) {		diff = -diff;		rv = vm_deallocate(&vm->vm_map, new, diff);		if (rv != KERN_SUCCESS) {			uprintf("sbrk: shrink failed, return = %d\n", rv);			return ENOMEM;		}		vm->vm_dsize -= btoc(diff);	}	return 0;}