libk  Diff

Differences From Artifact [9ed4178122]:

To Artifact [18509d6a57]:


   155    155      * `kmtreef(void*) → kmptr` - frees a node and all its children
   156    156   
   157    157   ## macros
   158    158   
   159    159   kmem defines the following macros.
   160    160   
   161    161    * `Kmsz(array)` - a convenience macro to return the number of elements in a static array. inserts the text `( sizeof (array) / sizeof (array) [0] )`
          162  + * `Kmszs(type, struct)` - a convenience macro to return the size of a struct. requires compound literals.
          163  + * `Kmszsa(type, array)` - calculates the number of elements in an array of a given struct type. inserts the text `( sizeof ( (type) array ) / sizeof (type) )`
          164  + * `Kmpsa(type, struct)` - a convenience macro to insert a "pascal struct array" - that is, a struct array prefixed with a size value. this is equivalent to `Kmszsa(type, array), array`