Alternative to sysconf(_SC_AVPHYS_PAGES) to get available memory?
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 12 Mar 2024 14:41:31 UTC
Hi all,
I'm just trying to compile osm2rdf (osm map data to GeoSPARQL),
and found that they use sysconf(_SC_AVPHYS_PAGES) to get available
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
_SC_AVPHYS_PAGES. I searched for alternatives, but did not find
any.
I also did not find anything like "available" memory in
sysconf(3).
So, can anyone tell me a FreeBSD alternative to
sysconf(_SC_AVPHYS_PAGES)?
Thanks,
Mathias
--
Mathias Picker
Geschäftsführer
Mathias.Picker@virtual-earth.de
virtual earth Gesellschaft für Wissens re/prä sentation mbH
http://www.virtual-earth.de/ HRB126870
support@virtual-earth.de Westendstr. 142
089 / 1250 3943