An unusual question...

wisecracker at tesco.net wisecracker at tesco.net
Sun Apr 17 12:37:50 EDT 2011


Hi Sturla...

> You'll need to mmap or valloc a page-alligned memory
> buffer (for which the size must be a multiple of the system
> page size), and call mprotect to make it executable.
> Copy your binary code into this buffer. Then you will
> need to do some magic with ctypes, Cython or C to call
> it; i.e. cast or memcpy the address of the excutable buffer
> into a function pointer, and dereference/call the function
> pointer.

Many thanks for the sensible reply, Miki has already given me a starter...

> If that sounds gibberish, see Steven's comment about heart transplants.

He he, I've already said my piece to Steven and will remain silent after this reply
to you...

Cheers...

Off air now...

--
73...

Bazza, G0LCU...

Team AMIGA...

http://homepages.tesco.net/wisecracker/

http://main.aminet.net/search?readme=wisecracker

http://mikeos.berlios.de/




More information about the Python-list mailing list