470,591 Members | 2,166 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,591 developers. It's quick & easy.

base64 memory question

Hi ng,
I see that after en encoding with base64, the memory used for the
variable that I use for store the encoded data, after deleted, python
keep a part of that memory:

#ls -lh on /tmp/test_zero
#-rw-r--r-- 1 michele michele 9,8M 2006-03-31 18:32 /tmp/test_zero
michele:~$ python2.4
Python 2.4.2 (#2, Nov 20 2005, 17:04:48)
[GCC 4.0.3 20051111 (prerelease) (Debian 4.0.2-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import base64
# Now top say me:
6217 michele 15 0 4412 2536 3336 S 0.0 0.3 0:00.01 python2.4
b = base64.encodestring(open("/tmp/test_zero", "rb").read())
#top:
6217 michele 15 0 39156 36m 3376 S 19.6 4.8 0:00.60 python2.4
del base64, b


#top
6217 michele 15 0 25644 23m 3376 S 0.0 3.1 0:00.61 python2.4

So like I can read from the top, python "forgot" to free that part of
memory. Is this normal? Is there a solution for free that memory?

P.s. The same happen on my win2k machine with py 2.4.2

Thanks,
Michele
Mar 31 '06 #1
0 786

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by James dean | last post: by
6 posts views Thread by Chris Fink | last post: by
2 posts views Thread by Lukasz Lacki | last post: by
14 posts views Thread by BB | last post: by
26 posts views Thread by Jim Brandley | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.