by mastax · 11y ago · 0 comments
IF you're curious, the relevant code is at https://github.com/krzysz00/rust-kernel/blob/master/kernel/m... . The functions that start with "rust_" are the allocator interface
F' as u8
is equivalent to b'F'
, and ['F' as u8, 'R' as u8, 'E' as u8, 'E' as u8]
is equivalent to *b"FREE"
which definitely is a lot more concise :). These are called byte string literals.Edit: The dereference is necessary because b"FREE" on its own has the type &[u8; 4].