[pypy-commit] pypy use-mmap: Windows support
arigo
pypy.commits at gmail.com
Mon Jul 11 08:32:53 EDT 2016
Author: Armin Rigo <arigo at tunes.org>
Branch: use-mmap
Changeset: r85654:7b5ec14900f0
Date: 2016-07-11 14:34 +0200
http://bitbucket.org/pypy/pypy/changeset/7b5ec14900f0/
Log: Windows support
diff --git a/rpython/rlib/rmmap.py b/rpython/rlib/rmmap.py
--- a/rpython/rlib/rmmap.py
+++ b/rpython/rlib/rmmap.py
@@ -926,4 +926,12 @@
def free(ptr, map_size):
VirtualFree_safe(ptr, 0, MEM_RELEASE)
-# register_external here?
+ def allocate_memory_chunk(map_size):
+ # used by the memory allocator (in llarena.py, from minimarkpage.py)
+ null = lltype.nullptr(rffi.VOIDP.TO)
+ return VirtualAlloc_safe(null, map_size, MEM_COMMIT | MEM_RESERVE,
+ PAGE_READWRITE)
+
+ def free_memory_chunk(addr, map_size):
+ # used by the memory allocator (in llarena.py, from minimarkpage.py)
+ VirtualFree_safe(addr, 0, MEM_RELEASE)
More information about the pypy-commit
mailing list