Updated kmalloc secprintf to satisfy forkbomb

This commit is contained in:
Guru Prasad Srinivasa 2016-02-29 20:12:01 -05:00
parent f0e1d8722c
commit f141875f20

View File

@ -995,6 +995,11 @@ subpage_kmalloc(size_t sz
if (prpage==0) { if (prpage==0) {
/* Out of memory. */ /* Out of memory. */
kprintf("kmalloc: Subpage allocator couldn't get a page\n"); kprintf("kmalloc: Subpage allocator couldn't get a page\n");
static int already_printed = 0;
if(!already_printed) {
already_printed = 1;
secprintf(SECRET, "out of memory", "kmalloc");
}
return NULL; return NULL;
} }
KASSERT(prpage % PAGE_SIZE == 0); KASSERT(prpage % PAGE_SIZE == 0);