Solved

Out of memory during request for 4201716 bytes, total sbrk() is 398184448 bytes!

Posted on 2004-09-21
5
1,245 Views
Last Modified: 2012-06-27
My Perl script generates the following error message:

Out of memory during request for 4201716 bytes, total sbrk() is 398184448 bytes!

Then, it dies. This does not occur during any constant iteration of my program, but typically after processing between 20,000 and 50,000 records from a MySQL database. The program's memory usage seems to cycle between 20 MB and 120 MB during normal operation, so I doubt that there is a memory leak. My OS is Windows XP, and I'm using Perl on Cygwin.

Any suggestions?

Thanks.
0
Comment
Question by:bobwood2000
  • 2
  • 2
5 Comments
 
LVL 10

Accepted Solution

by:
rj2 earned 500 total points
ID: 12120651
Try to use ActiveState Perl instead of Perl on Cygwin.

http://www.activestate.com/activeperl
0
 

Author Comment

by:bobwood2000
ID: 12127326
Okay, I'll try it, though ActiveState doesn't support the Expect.pm module, which I was planning on using.
0
 
LVL 48

Expert Comment

by:Tintin
ID: 12127756
The Expect module is available for ActiveState Perl.

http://aspn.activestate.com/ASPN/Modules/Perl/dist_html?dist_id=8808
0
 

Author Comment

by:bobwood2000
ID: 12129528
rj2 -- My program works flawlessly now that I'm using ActiveState Perl! Thank you. What made you suspect that the error was caused by the Perl interpretter rather than my code? I was questioning my code, and the database.

Tintin -- Your link suggests that Expect.pm is only supported by ActiveState on Linux. Am I missing something?
0
 
LVL 48

Expert Comment

by:Tintin
ID: 12129726
Ahh.

I didn't look closely at the supported platforms, and I found this in the Expect.pm FAQ:

--
Can I use this module with ActivePerl on Windows?

Up to now, the answer was 'No', but this has changed (muchas gracias to Nick Scott )!

You still cannot use ActivePerl, but if you use the Cygwin environment (http://sourceware.cygnus.com), which brings its own perl, and have the latest IO::Tty (v0.05) installed, it should work (feedback appreciated).
--
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This video discusses moving either the default database or any database to a new volume.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now