50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
the convenience function `kmstat(void*) → kmptr` wraps a pointer to a static object in a `kmptr` struct.
### kmcell
`kmcell` is a stub struct used to disambiguate between source types.a "source" is an object that can hold an allocated object, such as the heap, a memory pool, a fixed-length array on stack, or a fixed-length global array. all values produced by a kmem allocation function point to within a `kmcell`.
* `kmptr_kind kind` - kind of cell
* `size_t sz` - kind of cell (data plus all fields)
* `kmshred shred` - shredding flag
### kmref
`kmref` is a struct that constitutes the in-memory representation of a reference-counted cell.
* `kmkind kind = kmkind_ref` - kind of cell
|
|
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
the convenience function `kmstat(void*) → kmptr` wraps a pointer to a static object in a `kmptr` struct.
### kmcell
`kmcell` is a stub struct used to disambiguate between source types.a "source" is an object that can hold an allocated object, such as the heap, a memory pool, a fixed-length array on stack, or a fixed-length global array. all values produced by a kmem allocation function point to within a `kmcell`.
* `kmkind kind` - kind of cell
* `size_t size` - size of cell (data plus all fields)
* `kmshred shred` - shredding flag
### kmref
`kmref` is a struct that constitutes the in-memory representation of a reference-counted cell.
* `kmkind kind = kmkind_ref` - kind of cell
|