Subject: type inconsistencies
To: None <>
From: Gordon W. Ross <>
List: tech-kern
Date: 03/09/1995 11:26:56
> From:
> Date: Thu, 9 Mar 95 10:45:18 est

>    Yes.  Check the POSIX 1003.1 spec. for the official prototypes for
>    mmap, munmap, mprotect, etc.
> POSIX 1003.1 doesn't define any of these, and if it did, I *strongly*
> suspect it would have used size_t in the first place.  Right now,
> we're not even consistent; mmap(2) uses size_t, but the rest of them
> use int.

OK, I found my copy of the spec. and you're right, size_t is OK.

Quoting from:  IEEE Std. 1003.1b-1993
Section 12: Memory Management

#include <sys/mman.h>
void *mmap(void *addr, size_t len, int prot, int flags,
	int fildes, off_t off);

#include <sys/mman.h>
void *munmap(void *addr, size_t len);

#include <sys/mman.h>
void *mprotect(void *addr, size_t len, int prot);