Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Python C API String Memory Consumption

Reply
Thread Tools

Python C API String Memory Consumption

 
 
Hrvoje Niksic
Guest
Posts: n/a
 
      04-10-2009
Carl Banks <(E-Mail Removed)> writes:

> On Apr 9, 11:23*pm, Hrvoje Niksic <(E-Mail Removed)> wrote:
>> (E-Mail Removed) (Aahz) writes:
>> > BTW, note that if you're using Python 2.x, range(1000000) will cause
>> > a "leak" because ints are never freed. *Instead, use xrange().

>>
>> Note that using xrange() won't help with that particular problem.

>
> I think it will because with xrange the integers will not all have
> to exist at one time, so Python doesn't have to increase the size of
> the integer pool to a million.


Good catch! I stand corrected.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
limiting memory consumption of Python itself or a dict in a Python program Jonas Maurus Python 2 09-20-2007 09:10 AM
Low power consumption board with memory Duccio VHDL 0 02-25-2006 10:12 PM
How to calculate the CPU time consumption and memory consuption of any python program in Linux Shahriar Shamil Uulu Python 5 12-24-2005 08:29 PM
Calling the C API from Python and Python program from same C API -bidirectional Praveen, Tayal (IE10) Python 0 03-17-2005 06:33 AM
aspnet_wp.exe memory consumption Kiran Kumar ASP .Net 1 07-15-2003 12:08 PM



Advertisments