[pypy-svn] r35600 - pypy/dist/pypy/jit/codegen/i386
arigo at codespeak.net
arigo at codespeak.net
Mon Dec 11 22:56:10 CET 2006
Author: arigo
Date: Mon Dec 11 22:56:08 2006
New Revision: 35600
Modified:
pypy/dist/pypy/jit/codegen/i386/codebuf_posix.py
Log:
(pedronis, arigo)
The mmap error value is (void*) -1, not NULL.
Modified: pypy/dist/pypy/jit/codegen/i386/codebuf_posix.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/i386/codebuf_posix.py (original)
+++ pypy/dist/pypy/jit/codegen/i386/codebuf_posix.py Mon Dec 11 22:56:08 2006
@@ -42,7 +42,7 @@
flags = MAP_PRIVATE | MAP_ANONYMOUS
prot = PROT_EXEC | PROT_READ | PROT_WRITE
res = mmap_(cast(c_void_p(hint.pos), PTR), map_size, prot, flags, -1, 0)
- if not res:
+ if cast(res, c_void_p).value == -1:
raise MemoryError
hint.pos += map_size
return res
More information about the Pypy-commit
mailing list