workaround FormatSize issue w/ mono.

This commit is contained in:
Doug MacEachern 2004-09-22 16:51:49 +00:00
parent 80af172627
commit ab39e15dbe
1 changed files with 4 additions and 4 deletions

View File

@ -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() {