clinuxmemory-management

What is the significance of caddr_t and when is it used?


Can somebody please tell me:

  1. What is caddr_t ?
  2. When is it used ?
  3. How it is different from void* ?
  4. When to use void* and when to use caddr_t ?

Thanks in advance.


Solution

  • 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 *.