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


Groups > comp.lang.python > #97399

Re: python and ARM memory types

From dieter <dieter@handshake.de>
Subject Re: python and ARM memory types
Date 2015-10-05 09:01 +0200
References <62e78153-8a84-4b78-8881-8a891df0d496@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.377.1444028521.28679.python-list@python.org> (permalink)

Show all headers | View raw


voxner.dev@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".

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

python and ARM memory types voxner.dev@gmail.com - 2015-10-03 08:07 -0700
  Re: python and ARM memory types dieter <dieter@handshake.de> - 2015-10-05 09:01 +0200
    Re: python and ARM memory types Jorgen Grahn <grahn+nntp@snipabacken.se> - 2015-10-06 09:11 +0000
      Re: python and ARM memory types Laura Creighton <lac@openend.se> - 2015-10-06 11:38 +0200
      Re: python and ARM memory types voxner <voxner.dev@gmail.com> - 2015-10-06 18:28 +0530

csiph-web