From ab39e15dbe79f5ecd12037c40b62084161825481 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Wed, 22 Sep 2004 16:51:49 +0000 Subject: [PATCH] workaround FormatSize issue w/ mono. --- bindings/dotnet/src/Sigar.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bindings/dotnet/src/Sigar.cs b/bindings/dotnet/src/Sigar.cs index 2291f90a..c2aad542 100644 --- a/bindings/dotnet/src/Sigar.cs +++ b/bindings/dotnet/src/Sigar.cs @@ -48,13 +48,13 @@ namespace Hyperic.Sigar { } [DllImport(Sigar.LIBSIGAR)] - private static extern string + private static extern void 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); + StringBuilder buffer = new StringBuilder(56); + sigar_format_size(size, buffer); + return buffer.ToString(); } public Mem Mem() {