Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > 2c9d43cbbf2795eb606aea73c8b4f0fa > files > 6

audacious-plugins-2.4.5-1.1.mga1.src.rpm


# HG changeset patch
# User John Lindgren <john.lindgren@tds.net>
# Date 1269027672 14400
# Node ID cf740d37e431fa7ab8245b245844dc1339ba21f8
# Parent  20fd27db3db64362e1bfd2f1c7062a3de230122f
usf: MAP_32BIT is horribly machine-specific.  Don't use it.  Ever.  Closes: AUDPLUG-199.

diff -r 20fd27db3db6 -r cf740d37e431 src/usf/memory.c
--- a/src/usf/memory.c	Fri Mar 19 12:15:25 2010 +0000
+++ b/src/usf/memory.c	Fri Mar 19 15:41:12 2010 -0400
@@ -63,12 +63,8 @@
 #define PAGE_SIZE	4096
 void *malloc_exec(uint32_t bytes)
 {
-	void *ptr = NULL;
-
-	ptr = mmap(0,bytes,PROT_EXEC|PROT_READ|PROT_WRITE,MAP_PRIVATE | MAP_ANONYMOUS | MAP_32BIT, 0, 0);
-
-	return ptr;
-
+	return mmap (0, bytes, PROT_EXEC | PROT_READ | PROT_WRITE, MAP_PRIVATE |
+	 MAP_ANONYMOUS, 0, 0);
 }
 
 
@@ -96,11 +92,11 @@
 		DisplayError("Failed to allocate N64MEM");
 		return 0;
 	}
-	
+
 	memset(N64MEM, 0, RdramSize);
 
 	NOMEM = mmap((uintptr_t)N64MEM + RdramSize, 0xD000, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, 0, 0);
-	
+
 	if(RdramSize == 0x400000)
 	{
 	//	munmap(N64MEM + 0x400000, 0x400000);
@@ -150,15 +146,15 @@
 
 int PreAllocate_Memory(void) {
 	int i = 0;
-	
+
 	// Moved the savestate allocation here :)  (for better management later)
 	savestatespace = malloc(0x80275C);
-	
+
 	if(savestatespace == 0)
 		return 0;
-	
+
 	memset(savestatespace, 0, 0x80275C);
-	
+
 	for (i = 0; i < 0x400; i++) {
 		ROMPages[i] = 0;
 	}
@@ -186,10 +182,10 @@
 	if (JumpTable != NULL) {free( JumpTable); JumpTable=NULL;}
 	if (RecompCode != NULL){munmap( RecompCode, NormalCompileBufferSize); RecompCode=NULL;}
 	if (RSPRecompCode != NULL){munmap( RSPRecompCode, RSP_RECOMPMEM_SIZE + RSP_SECRECOMPMEM_SIZE); RSPRecompCode=NULL;}
-	
+
 	if (RSPJumpTables != NULL) {free( RSPJumpTables); RSPJumpTables=NULL;}
 	if (JumpTable != NULL) {free( JumpTable); JumpTable=NULL;}
-	
+
 
 	if(savestatespace)
 		free(savestatespace);