Date: Tue, 12 Mar 2024 15:41:31 +0100 From: Mathias Picker <Mathias.Picker@virtual-earth.de> To: freebsd-questions@freebsd.org Subject: Alternative to sysconf(_SC_AVPHYS_PAGES) to get available memory? Message-ID: <86cyrz8pfq.fsf@virtual-earth.de>
next in thread | raw e-mail | index | archive | help
Hi all, I'm just trying to compile osm2rdf (osm map data to GeoSPARQL),=20 and found that they use sysconf(_SC_AVPHYS_PAGES) to get available=20 memory: int64_t available() { return sysconf(_SC_AVPHYS_PAGES) * sysconf(_SC_PAGE_SIZE); } Looking at sysconf(3) I can see that we do not have=20 _SC_AVPHYS_PAGES. I searched for alternatives, but did not find=20 any.=20 I also did not find anything like "available" memory in=20 sysconf(3). So, can anyone tell me a FreeBSD alternative to=20 sysconf(_SC_AVPHYS_PAGES)? Thanks, Mathias --=20 Mathias Picker=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 Gesch=C3=A4ftsf=C3=BChrer Mathias.Picker@virtual-earth.de virtual earth Gesellschaft f=C3=BCr Wissens re/pr=C3=A4 sentation mbH http://www.virtual-earth.de/ HRB126870 support@virtual-earth.de Westendstr. 142 089 / 1250 3943=20=20=20=20=20=20=20=20=20=20=20=20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86cyrz8pfq.fsf>