Re: calloc fails and returns NULL

Discussion in 'C Programming' started by Greg Martin, Nov 7, 2012.

  1. Greg Martin

    Greg Martin Guest

    On 12-11-07 01:35 AM, k2ibegining wrote:
    > in one of our application's module, calloc() is failing and returning NULL. The amount of memory that it is trying to allocate is of structure which is of 9292 bytes. The operating system is AIX 7.1 and running VIOS 2.2.1.3.
    >
    > The machine has 2+GB ram and does not seems to have an issue with lack of memory. The same application module is running fine on one of the other boxes, which has same configurations as the problematic box.Following is a snippet of memory from both the boxes and they are same !
    >
    > WORKING BOX:
    >
    > RLIMIT_AS (infinite) (infinite)
    > RLIMIT_CORE 1073741312 (infinite)
    > RLIMIT_CPU (infinite) (infinite)
    > RLIMIT_DATA 134217728 (infinite)
    > RLIMIT_FSIZE (infinite) (infinite)
    > RLIMIT_NOFILE 2000 (infinite)
    > RLIMIT_RSS 33554432 (infinite)
    > RLIMIT_STACK 33554432 2147483646
    >
    > PROBLEMATIC BOX:
    >
    > RLIMIT_AS (infinite) (infinite)
    > RLIMIT_CORE 1073741312 (infinite)
    > RLIMIT_CPU (infinite) (infinite)
    > RLIMIT_DATA 134217728 (infinite)
    > RLIMIT_FSIZE (infinite) (infinite)
    > RLIMIT_NOFILE 2000 (infinite)
    > RLIMIT_RSS 33554432 (infinite)
    > RLIMIT_STACK 33554432 2147483646
    >
    > I'm clueless as can't really figure out why calloc() is failing even for 9292 bytes on this box.
    >
    > Thanks
    >
    >


    I seem to recall a command called "svmon" on AIX and I think I've used
    "top" as well. I doubt that they will tell you anything really useful
    though since it would seem unlikely that you are failing in the same
    place each time because you are out of memory unless the size you are
    requesting isn't what you think it is.
    Greg Martin, Nov 7, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Philip Lantz

    Re: calloc fails and returns NULL

    Philip Lantz, Nov 7, 2012, in forum: C Programming
    Replies:
    0
    Views:
    210
    Philip Lantz
    Nov 7, 2012
  2. Ben Bacarisse

    Re: calloc fails and returns NULL

    Ben Bacarisse, Nov 7, 2012, in forum: C Programming
    Replies:
    0
    Views:
    258
    Ben Bacarisse
    Nov 7, 2012
  3. Keith Thompson

    Re: calloc fails and returns NULL

    Keith Thompson, Nov 7, 2012, in forum: C Programming
    Replies:
    0
    Views:
    227
    Keith Thompson
    Nov 7, 2012
  4. Anand Hariharan

    Re: calloc fails and returns NULL

    Anand Hariharan, Nov 7, 2012, in forum: C Programming
    Replies:
    0
    Views:
    196
    Anand Hariharan
    Nov 7, 2012
  5. Ian Collins

    Re: calloc fails and returns NULL

    Ian Collins, Nov 8, 2012, in forum: C Programming
    Replies:
    0
    Views:
    251
    Ian Collins
    Nov 8, 2012
Loading...

Share This Page