workaround FormatSize issue w/ mono.
This commit is contained in:
parent
80af172627
commit
ab39e15dbe
|
@ -48,13 +48,13 @@ namespace Hyperic.Sigar {
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport(Sigar.LIBSIGAR)]
|
[DllImport(Sigar.LIBSIGAR)]
|
||||||
private static extern string
|
private static extern void
|
||||||
sigar_format_size(ulong size, StringBuilder buffer);
|
sigar_format_size(ulong size, StringBuilder buffer);
|
||||||
|
|
||||||
public static string FormatSize(ulong size) {
|
public static string FormatSize(ulong size) {
|
||||||
StringBuilder buffer = new StringBuilder();
|
StringBuilder buffer = new StringBuilder(56);
|
||||||
buffer.Capacity = 56;
|
sigar_format_size(size, buffer);
|
||||||
return sigar_format_size(size, buffer);
|
return buffer.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Mem Mem() {
|
public Mem Mem() {
|
||||||
|
|
Loading…
Reference in New Issue