brian at sweetapp.com
Mon Oct 14 03:40:28 CEST 2002
>> CPython uses malloc/free to allocate/deallocate Python objects.
>> The malloc routine must search a free list for a memory block
>> of sufficient size. So the timing of trivial Python operations
>> can vary significantly, depending on the malloc implementation
>> and the history of previous memory allocations/deallocations.
> ok, sure. but i want to make clear that has nothing to do with
> Python suitability for real time applications if the underlying OS
> causes the troubles. if the underlying memory management is that bad,
> even the smallest programm in C suffers from the same problem.
1. I'm not arguing that CPython is not appropriate for realtime
2. The C standard library is not (usually) part of the OS.
3. The smallest program in C need not allocate memory dynamically at
And it might be possible to structure larger programs such that the
portions requiring realtime performance need not allocate memory
dynamically. Currently I am using working with an embedded realtime
system where the dynamic memory allocation is only performed at
system startup time.
More information about the Python-list