From 91f79ce9fab7c9920b6f331ca074d58c17755fc9 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Wed, 17 Aug 2022 17:38:46 +0000 Subject: kernel: allocate notes in heap de-bloat the proc structure by allocating notes with on the heap instead of embedding them in the proc structure. This saves around 640 bytes per process. --- sys/src/9/xen/trap.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'sys/src/9/xen/trap.c') diff --git a/sys/src/9/xen/trap.c b/sys/src/9/xen/trap.c index 6faf1ccbf..a88b40b66 100644 --- a/sys/src/9/xen/trap.c +++ b/sys/src/9/xen/trap.c @@ -613,16 +613,14 @@ noted(Ureg* ureg, ulong arg0) default: pprint("unknown noted arg 0x%lux\n", arg0); - up->lastnote.flag = NDebug; + up->lastnote->flag = NDebug; /* fall through */ case NDFLT: - if(up->lastnote.flag == NDebug){ - qunlock(&up->debug); - pprint("suicide: %s\n", up->lastnote.msg); - } else - qunlock(&up->debug); - pexit(up->lastnote.msg, up->lastnote.flag!=NDebug); + qunlock(&up->debug); + if(up->lastnote->flag == NDebug) + pprint("suicide: %s\n", up->lastnote->msg); + pexit(up->lastnote->msg, up->lastnote->flag!=NDebug); } } -- cgit v1.2.3