If you're not familiar with the kernel you will probably try to use some specific thing from the C standard library only to find out that it doesn't work or isn't defined. You're looking at kmalloc() as the kernel equivalent for malloc(), though I think normally for something like a device driver you'd allocate pages of memory (via one of the __alloc_pages related calls) and manage it yourself from there. The best way is to use the source, look at other examples and search the code. But there is an API, and most common things have not really changed for decades now
I wish there would be more guides like this for macOS KEXT development. Easy to read, clean code examples, and quick to get started.
I was planning to port a driver for a specific PCI 802.11 NGFF WiFi device from FreeBSD or Linux, but it's really hard to find exhaustive guides on KEXT development, whereas Linux has the amazing guide at https://www.kernel.org/doc/html/latest/driver-api/80211/inde....
Same but for Windows. There are a handful of decent, but cursory WDK books / tutorials, and the Windows Internals books, but outside of that the MSDN documentation seems pretty bad. A lot of stuff seems almost contradictory (it probably isnt, but it reads that way)
Everytime ove wanted to develop a driver for windows, I get stuck because I cant even figure out what type of driver to use because there are so many possible models and existing stacks to build off of.
At least with linux and BSDs I can hop in something like an irc channel when and someone can usually help me.