FAQ
Hi all,

on HP-UX, my Parse::RecDescent parser dies with an Out of Memory error.
If I run the same skript with the same input on a Windows XP system
(with
less Memory!) it works fine. I did check the ulimit values but could not
find any user-limitations. Is there a way to solve this?

Best regards,
Reiner.

Search Discussions

  • Ron Smith at Aug 11, 2006 at 6:01 pm

    Buehl, Reiner (HPS EMEA GD-C&I) wrote:
    Hi all,

    on HP-UX, my Parse::RecDescent parser dies with an Out of Memory error.
    If I run the same skript with the same input on a Windows XP system
    (with
    less Memory!) it works fine. I did check the ulimit values but could not
    find any user-limitations. Is there a way to solve this?

    Best regards,
    Reiner.
    I have encountered the same thing. There are two possible explanations:

    You have a memory leak. This can come about when you create references
    to lexical variables that go out of scope and you fail to clean them up.
    If you have a pointer to a structure and both the pointer and
    structure go out of scope, they cannot be garbage collected because the
    structure's reference count never decrements to zero.

    You are on the hairy edge of using all resources. The two platforms
    allocate memory differently (and recall it is not the amount of memory
    you have, it is the total size of the swap space). If it turns out that
    HP-UX uses memory inefficiently in this case, you could easily find
    yourself in a magic zone where a test case passes on one and fails on
    the other.

    I suspect the memory leak. That was always my problem...
  • Reiner Buehl at Aug 12, 2006 at 2:44 am
    Hello Ron,

    thanks for your reply. I think your second option is what causes the
    problem. In the meantime I could find out that HP-UX uses a four-quadrant
    memory allocation scheme where the data, text and shared memory segments
    are apparently restricted to approx. 1GB for 32-bit processes. According
    to the linker man page, it is possible to change this so I think this is
    nothing that could be fixed without recompiling perl! Maybe it would be
    best to go to 64-bit directly...

    Best regards,
    Reiner.
    Buehl, Reiner (HPS EMEA GD-C&I) wrote:
    Hi all,

    on HP-UX, my Parse::RecDescent parser dies with an Out of Memory error.
    If I run the same skript with the same input on a Windows XP system
    (with
    less Memory!) it works fine. I did check the ulimit values but could not
    find any user-limitations. Is there a way to solve this?

    Best regards,
    Reiner.
    I have encountered the same thing. There are two possible explanations:

    You have a memory leak. This can come about when you create references
    to lexical variables that go out of scope and you fail to clean them up.
    If you have a pointer to a structure and both the pointer and
    structure go out of scope, they cannot be garbage collected because the
    structure's reference count never decrements to zero.

    You are on the hairy edge of using all resources. The two platforms
    allocate memory differently (and recall it is not the amount of memory
    you have, it is the total size of the swap space). If it turns out that
    HP-UX uses memory inefficiently in this case, you could easily find
    yourself in a magic zone where a test case passes on one and fails on
    the other.

    I suspect the memory leak. That was always my problem...

    --
    .............................._/.........................................
    Reiner Buehl _/
    Hewlett-Packard GmbH _/_/_/_/ _/_/_/_/
    Consulting & Integration _/ _/ _/ _/
    Mailstop ESD1 _/ _/ _/ _/ Mail: reiner.buehl@hp.com
    71034 Boeblingen _/ _/ _/_/_/_/ Phone: (+49) 7031 14-6701
    Germany _/ Fax: (+49) 7031 14-4961
    ................................._/......................................
    Hewlett-Packard GmbH, Herrenberger Str. 140, D-71034 Böblingen, Germany
    http://www.hp.com/de
    Geschäftsführer: Jörg Menno Harms (Vorsitzender), Jürgen Banhardt,
    Wolfram Fischer, Rainer Kaczmarczyk, Bärbel Schmidt, Fritz Schuller,
    Regine Stachelhaus
    Vorsitzender des Aufsichtsrates: Heribert Schmitz
    Sitz der Gesellschaft: Böblingen, Amtsgericht Böblingen HRB 4081
    .........................................................................
  • Dominique Dumont at Aug 21, 2006 at 1:08 pm

    reiner.buehl@hp.com ("Buehl, Reiner \(HPS EMEA GD-C&I\)") writes:

    Hi all,

    on HP-UX, my Parse::RecDescent parser dies with an Out of Memory error.
    If I run the same skript with the same input on a Windows XP system
    (with
    less Memory!) it works fine. I did check the ulimit values but could not
    find any user-limitations. Is there a way to solve this?
    As far as I recall, on HP-UX kernel limits the memory consumed by a
    process to 64 MB (this amount may have changed with recent HPUX).

    You can increase this amount by setting one of the kernel parameter
    and recompile the kernel (in fact a small part of the kernel).

    HTH

    --
    Dominique Dumont
    "Delivering successful solutions requires giving people what they
    need, not what they want." Kurt Bittner

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprecdescent @
categoriesperl
postedAug 11, '06 at 10:59a
activeAug 21, '06 at 1:08p
posts4
users3
websitemetacpan.org...

People

Translate

site design / logo © 2019 Grokbase