I had to disable mmap altogether for Irix.
authorChris Want <cwant@ualberta.ca>
Fri, 24 Feb 2006 14:37:24 +0000 (14:37 +0000)
committerChris Want <cwant@ualberta.ca>
Fri, 24 Feb 2006 14:37:24 +0000 (14:37 +0000)
intern/guardedalloc/intern/mallocn.c

index bb117756e661b0accd5e7434d28cde5c0396a860..44f7eda53105462801b7e9b28f15ae6c1773f3bd 100644 (file)
@@ -252,20 +252,15 @@ void *MEM_callocN(unsigned int len, const char *str)
 /* note; mmap returns zero'd memory */
 void *MEM_mapallocN(unsigned int len, const char *str)
 {
-#if defined(AMIGA) || defined(__BeOS) || defined(WIN32)
+#if defined(AMIGA) || defined(__BeOS) || defined(WIN32) || defined(__sgi)
        return MEM_callocN(len, str);
 #else
        MemHead *memh;
        
        len = (len + 3 ) & ~3;  /* allocate in units of 4 */
        
-#if defined(__sgi)
-       memh= mmap(0, len+sizeof(MemHead)+sizeof(MemTail), 
-                          PROT_READ|PROT_WRITE, MAP_SHARED, -1, 0);
-#else
        memh= mmap(0, len+sizeof(MemHead)+sizeof(MemTail), 
                           PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANON, -1, 0);
-#endif
        
        if(memh!=(MemHead *)-1) {
                make_memhead_header(memh, len, str);