Can somebody please tell me:
caddr_t ?void* ?void* and when to use caddr_t ?Thanks in advance.
caddr_t is a legacy BSD type associated with some low level calls like mmap, and it should never be used in modern code. It was rejected by the POSIX standard. The standardized mmap uses void *.
caddr_t was used as a pointer to a core address. I used it in SVR4 when I needed to access kernel structures from user space (having used mmap to access /dev/kmem). Even when "/proc" existed, the ps command still used mmap of the kernel to start walking the process table. As everybody states it was superseded by void *.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With