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

后端 未结 2 1753
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-01 13:33

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
2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-01 14:10

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

提交回复
热议问题