155
156
157
158
159
160
161
|
* `kmtreef(void*) → kmptr` - frees a node and all its children
## macros
kmem defines the following macros.
* `Kmsz(array)` - a convenience macro to return the number of elements in a static array. inserts the text `( sizeof (array) / sizeof (array) [0] )`
|
|
155
156
157
158
159
160
161
162
163
164
|
* `kmtreef(void*) → kmptr` - frees a node and all its children
## macros
kmem defines the following macros.
* `Kmsz(array)` - a convenience macro to return the number of elements in a static array. inserts the text `( sizeof (array) / sizeof (array) [0] )`
* `Kmszs(type, struct)` - a convenience macro to return the size of a struct. requires compound literals.
* `Kmszsa(type, array)` - calculates the number of elements in an array of a given struct type. inserts the text `( sizeof ( (type) array ) / sizeof (type) )`
* `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`
|