libk  Diff

Differences From Artifact [8406c82300]:

To Artifact [a4a4905883]:


    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  +	kmptr object = kmheapao(sizeof (struct object) * 16);
           25  +	if (object.kind == kmkind_fail) return kbad_mem;
    24     26   
    25         -	struct object* block = kmheapa(sizeof (struct object) * 4);
    26         -	if (block == null) return kbad_mem;
           27  +	/* struct object* block = kmheapa(sizeof (struct object) * 4); */
    27     28   	
    28         -	block[1].a = 5;
           29  +	struct object* block = object.ref;
           30  +	block[5].a = 5;
    29     31   
    30         -	if (kmheapf(block) != kmcond_ok) return kbad_mem;
           32  +	if (kmfree(object) != kmcond_ok) return kbad_mem;
    31     33   
    32     34   	return kbad_ok;
    33     35   }