Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-09-21
5
Medium Priority
?
1,289 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 2000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
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

876 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