head	1.2;
access;
symbols
	RELEASE_4_7_0:1.1
	RELEASE_4_6_2:1.1
	RELEASE_4_6_1:1.1
	RELEASE_4_6_0:1.1
	RELEASE_5_0_DP1:1.1
	RELEASE_4_5_0:1.1
	RELEASE_4_4_0:1.1
	RELEASE_4_3_0:1.1;
locks; strict;
comment	@# @;


1.2
date	2002.11.02.18.40.49;	author olgeni;	state dead;
branches;
next	1.1;

1.1
date	2001.01.23.20.50.38;	author pb;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Update to version R9B-0, use ${SHAREOWN}:${SHAREGRP} rather
than hardcoding root:wheel.
@
text
@--- lib/os_mon/c_src/memsup.c.orig	Mon Sep 20 23:05:24 1999
+++ lib/os_mon/c_src/memsup.c	Sat Dec  2 22:23:25 2000
@@@@ -89,6 +89,12 @@@@
 #include <ioLib.h>
 #include <memLib.h>
 #endif
+#ifdef __FreeBSD__
+#include <sys/types.h>
+#include <sys/sysctl.h>
+#include <sys/vmmeter.h>
+#include <vm/vm_param.h>
+#endif
 
 /* commands */
 #include "memsup.h"
@@@@ -172,6 +178,16 @@@@
     load_statistics();
     *tot = (latest.numBytesFree + latest.numBytesAlloc) >> shiftleft;
     *used = latest.numBytesAlloc >> shiftleft;
+#elif defined(__FreeBSD__)
+    int mib[2];
+    size_t len;
+    struct vmtotal memory;
+    mib[0] = CTL_VM;
+    mib[1] = VM_METER;
+    len = sizeof memory;
+    sysctl(mib, 2, &memory, &len, NULL, 0);
+    *tot = memory.t_vm >> shiftleft;
+    *used = memory.t_avm >> shiftleft;
 #elif defined(_SC_AVPHYS_PAGES)	/* Does this exist on others than Solaris2? */
     unsigned long avPhys, phys, pgSz;
     
# End
@


1.1
log
@Update port to erlang 7.1.0.
Change maintainer (agreed to by previous maintainer).

PR:		ports/24456
Submitted by:	sam@@inf.enst.fr
@
text
@@

