Solved

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

Posted on 2004-09-21
5
1,276 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
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…
Six Sigma Control Plans

623 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