-#define OS_VM_DEFAULT_PAGESIZE 8192
-
-long os_vm_page_size=(-1);
-static long os_real_page_size=(-1);
-
-static os_vm_size_t real_page_size_difference=0;
-
-/* So, this sucks. Versions of Solaris prior to 8 (SunOS releases
- earlier than 5.8) do not support MAP_ANON passed as a flag to
- mmap(). However, we would like SBCL compiled on SunOS 5.7 but
- running on 5.8 to use MAP_ANON, but because of C's lack of
- introspection at runtime, we can't grab the right value because
- it's stuffed in a header file somewhere. We can, however, hardcode
- it, and test at runtime for whether to use it... -- CSR, 2002-05-06
-
- And, in fact, it sucks slightly more, as if you don't use MAP_ANON
- you need to have /dev/zero open and pass the file descriptor to
- mmap(). So overall, this counts as a KLUDGE. -- CSR, 2002-05-20 */
-int KLUDGE_MAYBE_MAP_ANON = 0x0;
-int kludge_mmap_fd = -1; /* default for MAP_ANON */
-
-void os_init(void)
-{
- struct utsname name;
- int major_version;
- int minor_version;
-
- uname(&name);
- major_version = atoi(name.release);
- if (major_version != 5) {
- lose("sunos major version=%d (which isn't 5!)", major_version);
- }
- minor_version = atoi(name.release+2);
- if ((minor_version == 8) || (minor_version == 9)) {
- KLUDGE_MAYBE_MAP_ANON = 0x100;
- } else if (minor_version > 9) {
- FSHOW((stderr, "os_init: Solaris version greater than 9?\nUnknown MAP_ANON behaviour.\n"));
- lose("Unknown mmap() interaction with MAP_ANON");
- } else { /* minor_version < 8 */
- kludge_mmap_fd = open("/dev/zero",O_RDONLY);
- if (kludge_mmap_fd < 0) {
- perror("open");
- lose("Error in open(..)");
- }
- }