libk  Diff

Differences From Artifact [a4a4905883]:

To Artifact [c4d82c1a4a]:


    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  +
           25  +	void* region = kmheapa(2048);
           26  +	if (region == null) return kbad_mem;
           27  +
           28  +	kmzero(region,2048);
    26     29   
    27         -	/* struct object* block = kmheapa(sizeof (struct object) * 4); */
    28         -	
    29         -	struct object* block = object.ref;
    30         -	block[5].a = 5;
    31         -
    32         -	if (kmfree(object) != kmcond_ok) return kbad_mem;
           30  +	if (kmheapf(region) >= kmcond_fail) return kbad_mem;
    33     31   
    34     32   	return kbad_ok;
    35     33   }