On Mar 17, 2011, at 7:43 AM, Amit Dev wrote:
> This is using 165MB of memory. I really don't understand where the
> additional memory usage is coming from. [Size of both lists are same]
> 
> Python 2.6.4 on FreeBSD 7.2. On Linux and windows both uses around
> 100mb memory only.

It's possible that Linux and Windows are using Python's malloc, whereas FreeBSD 
might be using the native PHK or JE malloc.  (And it's not that surprising that 
different allocation patterns have different results in a garbage-collected 
environment.)

  http://docs.python.org/library/gc.html

...provides some info; consider importing gc and calling gc.collect() if you 
want to minimize the RAM needed to hold this big list of strings.

Regards,
-- 
-Chuck

_______________________________________________
freebsd-python@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"

Reply via email to