Re: [Numpy-discussion] memory position of numpy arrays

2006-10-27 Thread Lars Friedrich
Hello Gael (sorry, I just don't get the dots...), Am Freitag, den 27.10.2006, 08:46 +0200 schrieb Gael Varoquaux: > Worked great for me ! My approach was to write a small wrapper C > (actually C++, with "extern C" linking) library that exposed only what I > needed of the camera interface, in a "py

Re: [Numpy-discussion] memory position of numpy arrays

2006-10-26 Thread Gael Varoquaux
On Fri, Oct 27, 2006 at 07:55:06AM +0200, Lars Friedrich wrote: > If anyone is using python / numpy / ctypes for hardware control (say, > Cameras with grabber-cards or fire-wire / DCAM; National Instruments > acquisition cards using NIDAQmx, ...) I am interested in discussion! Worked great for me

Re: [Numpy-discussion] memory position of numpy arrays

2006-10-26 Thread Lars Friedrich
Am Donnerstag, den 26.10.2006, 19:08 +0900 schrieb David Cournapeau: > By the way, I found the information about locking pages into memory for > windows: > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/memory/base/virtuallock.asp > Thanks for the link, I now use a virtuallo

Re: [Numpy-discussion] memory position of numpy arrays

2006-10-26 Thread David Cournapeau
Lars Friedrich wrote: > Hello, > > thanks for your comments. > > Am Mittwoch, den 25.10.2006, 11:28 +0900 schrieb David Cournapeau: > >> Andrew Straw wrote: >> >>> David Cournapeau wrote: >>> >>> I don't know anything about your device, but a driver directly accessing a

Re: [Numpy-discussion] memory position of numpy arrays

2006-10-26 Thread Lars Friedrich
Hello, thanks for your comments. Am Mittwoch, den 25.10.2006, 11:28 +0900 schrieb David Cournapeau: > Andrew Straw wrote: > > David Cournapeau wrote: > > > >> I don't know anything about your device, but a driver directly accessing > >> a memory buffer from a userland program sounds like a bu

Re: [Numpy-discussion] memory position of numpy arrays

2006-10-24 Thread David Cournapeau
Andrew Straw wrote: > David Cournapeau wrote: > >> I don't know anything about your device, but a driver directly accessing >> a memory buffer from a userland program sounds like a bug to me. >> > David, DMA memory (yes, I know thats an example of RAS Syndrome, > apologies) allows hardwar

Re: [Numpy-discussion] memory position of numpy arrays

2006-10-24 Thread Andrew Straw
David Cournapeau wrote: > I don't know anything about your device, but a driver directly accessing > a memory buffer from a userland program sounds like a bug to me. David, DMA memory (yes, I know thats an example of RAS Syndrome, apologies) allows hardware to fill a chunk of RAM and then hand it

Re: [Numpy-discussion] memory position of numpy arrays

2006-10-23 Thread David Cournapeau
Lars Friedrich wrote: > Andrew, > > thanks for your fast answer. > > Am Montag, den 23.10.2006, 00:45 -0700 schrieb Andrew Straw: > >> It sounds like your hardware drivers may be buggy -- you should only get >> segfaults, not (the Windows equivalent of) kernel panics, when your >> userspace cod

Re: [Numpy-discussion] memory position of numpy arrays

2006-10-23 Thread A. M. Archibald
On 24/10/06, Lars Friedrich <[EMAIL PROTECTED]> wrote: > I am not really sure about the term "locking". Does that mean that this > part is not paged, or that this part is not accessed by two entities at > the same time? Or both? There are two kinds of locking, and really, you probably want both.

Re: [Numpy-discussion] memory position of numpy arrays

2006-10-23 Thread Lars Friedrich
Andrew, thanks for your fast answer. Am Montag, den 23.10.2006, 00:45 -0700 schrieb Andrew Straw: > It sounds like your hardware drivers may be buggy -- you should only get > segfaults, not (the Windows equivalent of) kernel panics, when your > userspace code accesses wrong memory. When I start

Re: [Numpy-discussion] memory position of numpy arrays

2006-10-23 Thread Andrew Straw
It sounds like your hardware drivers may be buggy -- you should only get segfaults, not (the Windows equivalent of) kernel panics, when your userspace code accesses wrong memory. But if you have buggy hardware drivers, I suppose it's possible that locking the memory will help. This wouldn't be the

[Numpy-discussion] memory position of numpy arrays

2006-10-22 Thread Lars Friedrich
Hello all, to interact with some hardware (data retrieval), I use the following scheme (Windows, Python 2.4): * in Python, I create a numpy array as a buffer * I pass this array to a self written .dll using ctypes * the C-code in the .dll passes the pointer to the buffer to the API of the hardwar