Panic in sbrk if setheap hasn't been called yet. This is preferable to
a mysterious crash. Sponsored by: Netflix
This commit is contained in:
parent
328884aef7
commit
9a7c084993
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326886
@ -52,6 +52,9 @@ sbrk(int incr)
|
||||
{
|
||||
char *ret;
|
||||
|
||||
if (heapbase == 0)
|
||||
panic("No heap setup\n");
|
||||
|
||||
if ((heapsize + incr) <= maxheap) {
|
||||
ret = (char *)heapbase + heapsize;
|
||||
bzero(ret, incr);
|
||||
|
Loading…
Reference in New Issue
Block a user