[pypy-svn] r54670 - pypy/branch/hybrid-io/pypy/rpython

fijal at codespeak.net fijal at codespeak.net
Mon May 12 13:38:41 CEST 2008


Author: fijal
Date: Mon May 12 13:38:40 2008
New Revision: 54670

Modified:
   pypy/branch/hybrid-io/pypy/rpython/llinterp.py
Log:
implement realloc_grow and realloc_shrink


Modified: pypy/branch/hybrid-io/pypy/rpython/llinterp.py
==============================================================================
--- pypy/branch/hybrid-io/pypy/rpython/llinterp.py	(original)
+++ pypy/branch/hybrid-io/pypy/rpython/llinterp.py	Mon May 12 13:38:40 2008
@@ -858,9 +858,13 @@
         assert lltype.typeOf(size) == lltype.Signed
         return llmemory.raw_malloc(size)
 
-    def op_raw_realloc(self, ptr, size):
+    def op_raw_realloc_grow(self, addr, old_size, size):
         assert lltype.typeOf(size) == lltype.Signed
-        return llmemory.raw_realloc(llmemory.cast_ptr_to_adr(ptr), size)
+        return llmemory.raw_realloc_grow(addr, old_size, size)
+
+    def op_raw_realloc_shrink(self, addr, old_size, size):
+        assert lltype.typeOf(size) == lltype.Signed
+        return llmemory.raw_realloc_shrink(addr, old_size, size)
 
     op_boehm_malloc = op_boehm_malloc_atomic = op_raw_malloc
 



More information about the Pypy-commit mailing list