Thunking problems with arch issues

rikki cattermole via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jul 1 18:51:03 PDT 2016


Couple of things could be happening.

1) Alignments are off, aligning of data really really matters when 
dealing with executable code.
2) For Windows only. Don't forget to call FlushInstructionCache. Before 
executing. 
https://msdn.microsoft.com/en-us/library/windows/desktop/ms679350(v=vs.85).aspx
3) Don't use new to get your executable memory, nope nope nope. Use 
things like VirtualAlloc as malloc doesn't work right see the first point.


More information about the Digitalmars-d-learn mailing list