add FormatSize binding
This commit is contained in:
1 parent
1b50ea38e2
commit
ff4e25b6a2
1 file changed
+10
@@ -39,6 +39,16 @@ namespace Hyperic.Sigar {
|
||||
this.sigar = new HandleRef(this, handle);
|
||||
}
|
||||
|
||||
[DllImport(Sigar.LIBSIGAR)]
|
||||
private static extern string
|
||||
sigar_format_size(ulong size, StringBuilder buffer);
|
||||
|
||||
public static string FormatSize(ulong size) {
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.Capacity = 56;
|
||||
return sigar_format_size(size, buffer);
|
||||
}
|
||||
|
||||
public Mem Mem() {
|
||||
return Hyperic.Sigar.Mem.NativeGet(this);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user