Discussion:
Parser produces Out of Memory error on HP-UX but not on Windows XP
(too old to reply)
Reiner Buehl
2006-08-11 10:58:44 UTC
Permalink
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.
Ron Smith
2006-08-11 18:01:25 UTC
Permalink
Post by Reiner Buehl
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...
Dominique Dumont
2006-08-21 13:03:46 UTC
Permalink
Post by Reiner Buehl
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
Loading...