need to make this something like if (brk_valid(addr)) so we
can keep it portable */
- uaddr_t aligned = (uaddr_t) ALIGNUP(addr);
- if (aligned >= brk_limit()) {
+ if (addr >= brk_limit()) {
kprintf("%d: out of memory\n", udata.u_ptab->p_pid);
udata.u_error = ENOMEM;
return -1;
}
/* If we have done a break that gives us more room we must zero
the extra as we no longer guarantee it is clear already */
- if (aligned > udata.u_break)
- uzero((void *)udata.u_break, aligned - udata.u_break);
- udata.u_break = aligned;
+ if (addr > udata.u_break)
+ uzero((void *)udata.u_break, addr - udata.u_break);
+ udata.u_break = addr;
return 0;
}