[Mono-osx] Problem with loading OSX libc ( malloc)
Eoin Norris
e.norris at mac.com
Tue Oct 10 09:32:16 EDT 2006
Downloaded some SQLite sources from the good people at Finisar, and
compiled. I get however an exception like this on run.
The exception is at (wrapper managed-to-native)
Finisar.SQLite.Util:malloc (uint)
at Finisar.SQLite.Util.AllocateUnmanagedMemory (Int32 size) [0x00000]
at Finisar.SQLite.MarshalStr.GetSQLiteStr () [0x00000]
at Finisar.SQLite.sqlite3.open (System.String filename) [0x00000]
at Finisar.SQLite.SQLiteConnection.Open () [0x00000]
Finisar imports the libc as so
[DllImport("libc")]
private extern static IntPtr malloc(UInt32 bytes);
and calls it like so
public static IntPtr AllocateUnmanagedMemory( Int32 size )
{
if( (int)Environment.OSVersion.Platform == UNIX )
return malloc((UInt32)1000);
else
return HeapAlloc( GetProcessHeap(), 0, (UInt32)size );
}
Anybody got any ideas? ( note it does seem to load the SQLLite3
library - which is in /lib/bin/ because an db, if empty, is created
before I get an exception)
-- Eoin Norris
More information about the Mono-osx
mailing list