in reply to Out Of Memory error at 950MB with 14GB free RAM

In that config you quoted, note the "ptrsize=4"? That means you're using normal 32-bit pointers (ptrsize, etc, are in bytes, 4 bytes * 8 bits/byte = 32 bits), which have a theoretical maximial addressable space of 4GB -- but much of that will be reserved for the kernel. You need a newer perl, properly compiled for 64-bit support all over the place (and not just for 64-bit-sized files). (You really only need 64-bit pointers, not 64-bit ints, but having intsize != ptrsize isn't all that well supported... I think. I've never used a memory space larger then 1GB.)


Warning: All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

  • Comment on Re: Out Of Memory error at 950MB with 14GB free RAM

Replies are listed 'Best First'.
Re: Re: Out Of Memory error at 950MB with 14GB free RAM
by Anomynous Monk (Scribe) on Feb 10, 2004 at 07:52 UTC
    IIUC, PA-RISC chips have a segmented architecture, just like the old 80x86, except that the segments are up to 4Gb instead of 64Kb. Unless HP-UX uses them very differently than MPEiX (with which I am more familiar), the kernel doesn't use much if any of that space; it's just process data. (though memory mapped files may use some, and there will be a division of what's available between the heap and the stack.)

      32-bit pointers can't possibly address more then 2**32 bits of memory (bytes 0..((2**32)-1)). Perhaps, by some funky technique (not so funky, really), HP-UX manages to make almost all of that 4GB available to user processes. If you want more then 4GB of memory space, you have to use 64 bit pointers (or at least greater then 32-bit pointers -- 32-bit intel chips can use 36 bit pointers through PXE36 in some circumstances, with lots of extra work, whcih I don't think perl even supports -- so it's a choice of 32-bit for 4 GiB, or 64-bit for up to 16,777,216 TiB. Since the OP wants more then 4GB, 64 bit it is.


      Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).