Differences From
Artifact [5796abefa5]:
5 5
6 6 struct object {
7 7 u8 a;
8 8 s16 b;
9 9 bool c;
10 10 };
11 11
12 -kbad entry(kenv e) {
12 +stat_long entry(kenv e) {
13 13 const char msg[] = "hello from libk\n";
14 14 ksraw ptr = { Kmsz(msg), msg };
15 15
16 16 bool maybe = true;
17 17 maybe = no;
18 18
19 19 if (kiosend(e.std, ptr, null) == kiocond_ok) {
20 20 /* great, continue */
21 21 } else {
22 22 return kbad_io;
23 23 }
24 24
25 25 struct object* block = kmheapa(sizeof (struct object) * 4);
26 - if (block == null) return kbad_mem; else return kbad_ok;
26 + if (block == null) return kbad_mem;
27 27
28 28 block[1].a = 5;
29 +
30 + if (kmheapf(block) != kmcond_ok) return kbad_mem;
29 31
30 32 return kbad_ok;
31 33 }