Is it possible to get the Physical memory address of a variable in python?
timr at probo.com
Thu Nov 12 05:35:36 CET 2009
Ognjen Bezanov <Ognjen at mailshack.com> wrote:
>I'm trying to see if there is any way I can make Python share data
>between two hosts using DMA transfers over a firewire connection, so
>avoiding the need for another layer on top such as IPv4 + Python sockets.
>Thanks to some old python bindings which I updated to python 2.6, I can
>read any write to the RAM of any firewire connected host within python.
>Because it uses DMA (the cpu is not involved in this at all), I can only
>specify a physical address within the 4GB ram limit to read from and
> From what I've been told so far, it's not possible to do this without
>some OS-specific (Linux in this case) syscall. Is this correct?
Correct. User-mode programs cannot find physical addresess, and they
cannot lock pages into memory (which is required for DMA). You need the
assistance of a driver for this. The driver will find the physical
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the Python-list