Mercurial > hg > Members > menikon > CbC_xv6
changeset 316:b58517e62ebf
use goto panic at vm_impl
author | anatofuz |
---|---|
date | Thu, 06 Feb 2020 18:34:54 +0900 |
parents | 600fd7db5344 |
children | d1dfc4af40d7 |
files | src/impl/vm_impl_private.cbc |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/impl/vm_impl_private.cbc Thu Feb 06 17:58:56 2020 +0900 +++ b/src/impl/vm_impl_private.cbc Thu Feb 06 18:34:54 2020 +0900 @@ -4,6 +4,7 @@ #include "defs.h" #include "memlayout.h" #interface "vm_impl.h" +#interface "Err.h" /* vm_impl* createvm_impl2(); //:skip @@ -140,8 +141,10 @@ release(&kpt_mem.lock); if ((r == NULL) && ((r = kmalloc (PT_ORDER)) == NULL)) { - // panic("oom: kpt_alloc"); - // goto panic + char* msg = "oom: kpt_alloc"; + struct Err* err = createKernelError(&proc->cbc_context); + Gearef(cbc_context, Err)->msg = msg; + goto err->panic(msg); } memset(r, 0, PT_SZ);