Search code examples
mmapmanpage

Unfamiliar notation in manpage mmap(2): void addr[.length]


What does the notation void addr[.length] in mmap(2) mean? I could interpret void *addr or size_t length, but what is the semantics of this "mixed" notation?


Solution

  • Google solved this for me after all: void addr[.length] is a common reference to alternative ways for passing an array:

    int foo(void *addr);
    int foo(void addr[]);
    int foo(void addr[10]);