Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #3413

Re: An unusual question...

Date 2011-04-17 17:37 +0100
From <wisecracker@tesco.net>
Subject Re: An unusual question...
Newsgroups comp.lang.python
Message-ID <mailman.466.1303058274.9059.python-list@python.org> (permalink)

Show all headers | View raw


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/

Back to comp.lang.python | Previous | NextNext in thread | Find similar


Thread

Re: An unusual question... <wisecracker@tesco.net> - 2011-04-17 17:37 +0100
  Re: An unusual question... rusi <rustompmody@gmail.com> - 2011-04-17 10:30 -0700
    Re: An unusual question... Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-04-17 18:15 +0000

csiph-web