Updated default memory manager for other platform.

This commit is contained in:
soukoku
2015-02-18 21:23:55 -05:00
parent daaeb840af
commit 77b3fdfee0
4 changed files with 43 additions and 2 deletions

View File

@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
namespace NTwain.Internals
{
class LinuxMemoryManager : IMemoryManager
{
#region IMemoryManager Members
public IntPtr Allocate(uint size)
{
return Marshal.AllocHGlobal((int)size);
}
public void Free(IntPtr handle)
{
Marshal.FreeHGlobal(handle);
}
public IntPtr Lock(IntPtr handle)
{
return handle;
}
public void Unlock(IntPtr handle)
{
// no op
}
#endregion
}
}