libk  Diff

Differences From Artifact [dc631dc568]:

To Artifact [4d62b7403b]:


     1      1   #ifndef KImem
     2      2   #define KImem
            3  +#include <k/type.h>
            4  +
            5  +typedef enum kmkind {
            6  +	kmkind_none,
            7  +	kmkind_heap,
            8  +	kmkind_pool,
            9  +	kmkind_ref,
           10  +	kmkind_tree
           11  +} kmkind;
           12  +
           13  +typedef enum kmshred {
           14  +	kmshred_yes,
           15  +	kmshred_no
           16  +} kmshred;
           17  +
           18  +typedef struct kmcell {
           19  +	kmkind kind;
           20  +	sz size;
           21  +	kmshred shred;
           22  +	sz refs;
           23  +	struct kmcell* src;
           24  +	char data[];
           25  +} kmcell;
           26  +
           27  +typedef struct kmptr {
           28  +	kmkind kind;
           29  +	kmshred shred;
           30  +	void* ref;
           31  +	kmcell* cell;
           32  +} kmptr;
     3     33   
     4     34   #endif