new char[] returns null.... - Aix

This is a discussion on new char[] returns null.... - Aix ; Hi All, We've got an interesting problem. Our multithreaded application runs great most of the time. Occasionally, in one specific function, a call to new char[2097152] returns a NULL pointer. Ok, we said. Let's give it more heap. So we ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: new char[] returns null....

  1. new char[] returns null....

    Hi All,

    We've got an interesting problem. Our multithreaded application runs
    great most of the time. Occasionally, in one specific function, a
    call to new char[2097152] returns a NULL pointer. Ok, we said. Let's
    give it more heap. So we set maxdata=0x4000000 using ldedit for the
    binary.

    But the problem still happens. We set an error handling routine at
    that location, to show us svmon, and 3 of the 4, 256Mb segments are
    still empty. ulimit is also set to 1Gb. Paging space usage is at
    something small like 3%. nofiles is set to 1000, and we only have 10
    open.

    Why would the call to new char[2097152] not succeed? Meanwhile,
    we're stuck restarting the process every time.

    Thanks much. Sincerely, George

    (AIX 5.3, xlC 6.0.0.15)


  2. Re: new char[] returns null....

    The AIX limits are *for user*, not *for each process*. Did you check
    the user limits? (they are in /etc/security/limits file, and are
    changeable with smit chuser or simply chuser).


  3. Re: new char[] returns null....

    Oh, yes, we're aware of that, and we had. Unfortunately, when we get
    the error, svmon for the process is far below the ulimit for data.

    (Actually I think a more accurate wording is "user process resource
    limits" - limits on what a process can consume. Configurable for each
    user.)



+ Reply to Thread