forked from bartvdbraak/blender
I had to disable mmap altogether for Irix.
This commit is contained in:
parent
d5096f48b1
commit
5e3163041a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user