[pypy-commit] pypy default: Patch by Gabriel Lavoie for freebsd

arigo noreply at buildbot.pypy.org
Fri Aug 26 06:06:27 CEST 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r46777:0f2bc7ed8998
Date: 2011-08-26 06:05 +0200
http://bitbucket.org/pypy/pypy/changeset/0f2bc7ed8998/

Log:	Patch by Gabriel Lavoie for freebsd

diff --git a/pypy/rpython/memory/gc/env.py b/pypy/rpython/memory/gc/env.py
--- a/pypy/rpython/memory/gc/env.py
+++ b/pypy/rpython/memory/gc/env.py
@@ -116,6 +116,10 @@
     def get_total_memory():
         return get_total_memory_darwin(get_darwin_sysctl_signed('hw.memsize'))
 
+elif sys.platform.startswith('freebsd'):
+    def get_total_memory():
+        return get_total_memory_darwin(get_darwin_sysctl_signed('hw.usermem'))
+
 else:
     def get_total_memory():
         return addressable_size       # XXX implement me for other platforms


More information about the pypy-commit mailing list