Wealot
Wealot

Reputation: 209

find out what a syscall parameter is in 'real life'

I am looking at a program that uses the mmap syscall with the flag parameter as 0x22. As I am quite a newbie with all this I do not understand how I can find out what 0x22 is exactly (as in is it: MAP_PRIVATE or is it MAP_ANON etc.).

Now my question is mostly about how I would find out, not so much what this example means. SO that the next time I can quickly do it myself.

Upvotes: 0

Views: 34

Answers (1)

fuz
fuz

Reputation: 92976

Typically, you'd look in the manual (try man 2 mmap). From there on, you would check the header files for the values of the symbol constants defined there to reconstruct what 0x22 might be. But mostly, read the manual.

Upvotes: 1

Related Questions