set a breakpoint in malloc_error_break to debug?

Vincent Davis vincent at vincentdavis.net
Wed Apr 6 23:34:52 EDT 2011


Not sure what is going on here. the set "wset" is large I am sure but ... Is
this something I am going wrong?
def walked_dir(adir):
 wdirset = set()
 for dirpath, dirnames, filenames in os.walk(adir):
 for name in filenames:
 if isfile(dirpath+'/'+name):
 fullfilename = dirpath+'/'+name
 the_stats = stat(fullfilename)
 wdirset.add((dirpath, tuple(dirnames), tuple(filenames),
fullfilename, name, the_stats))
 if not len(filenames):
 wdirset.add((dirpath, tuple(dirnames), tuple(filenames), None,
None, None))
 return wdirset
directory = '/Users/vmd/Dropbox'
wset = walked_dir(directory)
>>> wset
Python(19914) malloc: *** mmap(size=1536290816) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Python(19914) malloc: *** mmap(size=1536290816) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Python(19914) malloc: *** mmap(size=1536290816) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Traceback (most recent call last):
 File "<string>", line 1, in <fragment>
MemoryError:
>>>
Python 2.7.1 |EPD 7.0-2 (32-bit)| (r271:86832, Dec 3 2010, 15:41:32)
[GCC 4.0.1 (Apple Inc. build 5488)]
-- 
Thanks
Vincent Davis
720-301-3003
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110406/45dbd5f3/attachment.html>


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /