To answer my own question in case anyone runs into this.
Try this:
private byte* Align(IntPtr buf, uint alignTo)
{
//The buffer must originally be at least one alignment bigger!
var diff = alignTo - (buf.ToInt64() % alignTo);
var aligned = (IntP
Oops read is failing as well.
Aside from having aligned buffer sizes do I need to do something like memalign?
Cheers,
Greg
On Mon, Jan 12, 2015 at 3:55 AM, Greg Young wrote:
> I have been trying to use Syscalls a bit but am getting an exception I
> can't figure out why.
>
> Opening code throws
I have been trying to use Syscalls a bit but am getting an exception I
can't figure out why.
Opening code throws no exceptions:
var flags = OpenFlags.O_RDWR | OpenFlags.O_DIRECT |
OpenFlags.O_CREAT;
//var f = NativeConvert.FromOpenFlags(flags); not needed?
var h
On Sunday, January 11, 2015, Michael Hutchinson wrote:
> On 9 January 2015 at 16:32, Greg Young > wrote:
> > It's not source analysis it theorem proving think formal proving a la
> eiffel
>
> The Code Contracts tools analyze (and rewrite) compiled code, but
> there's no reason why equivalent sou