Don't panic if we can't malloc a cblock...just print a console message

and be happy.
This commit is contained in:
dg 1994-05-29 07:50:11 +00:00
parent 7daf0174d8
commit 7bb4d900b6
2 changed files with 8 additions and 4 deletions

View File

@ -92,8 +92,10 @@ cblock_alloc_cblocks(number)
for (i = 0; i < number; ++i) {
tmp = malloc(sizeof(struct cblock), M_TTYS, M_NOWAIT);
if (!tmp)
panic("clist_init: could not allocate cblock");
if (!tmp) {
printf("cblock_alloc_cblocks: could not malloc cblock");
break;
}
bzero((char *)tmp, sizeof(struct cblock));
cblock_free(tmp);
}

View File

@ -92,8 +92,10 @@ cblock_alloc_cblocks(number)
for (i = 0; i < number; ++i) {
tmp = malloc(sizeof(struct cblock), M_TTYS, M_NOWAIT);
if (!tmp)
panic("clist_init: could not allocate cblock");
if (!tmp) {
printf("cblock_alloc_cblocks: could not malloc cblock");
break;
}
bzero((char *)tmp, sizeof(struct cblock));
cblock_free(tmp);
}