voxner....@gmail.com writes: > ... > But how do I specify (streaming,write-combining,write-back) memory types in > python ? Is there a library that I can use ? I am thinking of programming > some fixed memory space (say 0x1000_000 - 0x2000_000) as "WC or WT or > streaming" using the OS and then try to use the mmap facility in python.
Python is quite a high level programming language - i.e. lots of things are out of direct control of the programmer - among others memory management. I suppose you will need an approach that gives you more control over memory use - maybe, write your algorithms partially in the "C" programming language. You might find "cython" helpful to easily combine Python parts and "C" parts. "cython" is a compiler that compiles a source (which can use a subset of Python and a subset of "C") into a "C" source file which is then processed like a typical "C" source. It takes care of a lot of the difficulties at the Python-C interface and, thus, greatly facilitates combining Python and "C" parts. > What set of libraries can I use ? Where should I start ? Fixed memories are > discouraged so what kind of alternatives I can use ? Note that modern operating systems virtualize memory. You will need a lot of tricks to be able to use a specific range of physical memory in "user level" processes -- but hopefully, you do not need to control thing of the "physical memory level". -- https://mail.python.org/mailman/listinfo/python-list