Align address of asm_runJIT down to nearest page boundary instead of up for mprotect on Linux and OS X (bug 5601, r=dvander).
Former-commit-id: af6ba72b0ba1f2ac1316337a6c67f5f39996182a
This commit is contained in:
parent
d8ddbb0687
commit
e5c92a2c30
@ -936,7 +936,7 @@ int AMXAPI amx_Init(AMX *amx, void *program)
|
|||||||
|
|
||||||
/* Linux already has mprotect() */
|
/* Linux already has mprotect() */
|
||||||
/* But wants the address aligned! */
|
/* But wants the address aligned! */
|
||||||
#define ALIGN(addr) (char *)(((long)addr + sysconf(_SC_PAGESIZE)-1) & ~(sysconf(_SC_PAGESIZE)-1))
|
#define ALIGN(addr) ((void *)((intptr_t)addr & ~(sysconf(_SC_PAGESIZE)-1)))
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user