Method: LinuxStat::Sysinfo.totalswap
- Defined in:
- ext/sysinfo/sysinfo.c
.totalswap ⇒ Object
52 53 54 55 56 57 58 59 60 |
# File 'ext/sysinfo/sysinfo.c', line 52
VALUE totalswap(VALUE obj) {
static struct sysinfo info ;
char status = sysinfo(&info) ;
if (status < 0) return Qnil ;
VALUE _rb_v = ULL2NUM((unsigned long long) info.totalswap) ;
VALUE _rb_mem_unit = ULL2NUM((unsigned long long) info.mem_unit) ;
return rb_funcallv_public(_rb_v, rb_intern("*"), 1, &_rb_mem_unit) ;
}
|