realloc() crash - Motif

This is a discussion on realloc() crash - Motif ; I am still new to all of this so please forgive my ignorance. I am running an application that uses Motif 1.2.4 on a Solaris 10 machine. I am using a list and when I delete the last item of ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: realloc() crash

  1. realloc() crash

    I am still new to all of this so please forgive my ignorance. I am
    running an application that uses Motif 1.2.4 on a Solaris 10 machine.
    I am using a list and when I delete the last item of a list or the
    whole list I receive this error:

    Error: Cannot perform realloc


    I have tried to increase the swap size to 7GB with no luck. I am not
    really sure what else to try, If anyone can help it would be much
    appreciated.


  2. Re: realloc() crash

    redorick@gmail.com wrote:
    > I am still new to all of this so please forgive my ignorance. I am
    > running an application that uses Motif 1.2.4 on a Solaris 10 machine.
    > I am using a list and when I delete the last item of a list or the
    > whole list I receive this error:
    >
    > Error: Cannot perform realloc
    >
    >
    > I have tried to increase the swap size to 7GB with no luck.
    >


    Holy crap! That must be one seriously large list...

    >
    > I am not really sure what else to try, If anyone can help it would
    > be much appreciated.
    >


    Are you compiling it yourself? If so, you could try compiling with the
    symbol table intact and then run it in the debugger. That would at least
    give you more information than what you've posted here. If you're trying
    to delete the list entirely, it might work better to call free() (on the
    list pointer), instead of realloc. Are you using the forte compiler? If
    you want to post a code snippit I could try it on mine, I've got Solaris
    10 and the forte compiler...

  3. Re: realloc() crash

    On Oct 11, 10:58 pm, Chris Sorenson wrote:
    > redor...@gmail.com wrote:
    > > I am still new to all of this so please forgive my ignorance. I am
    > > running an application that uses Motif 1.2.4 on a Solaris 10 machine.
    > > I am using a list and when I delete the last item of a list or the
    > > whole list I receive this error:

    >
    > > Error: Cannot perform realloc

    >
    > > I have tried to increase the swap size to 7GB with no luck.

    >
    > Holy crap! That must be one seriously large list...
    >
    >
    >
    > > I am not really sure what else to try, If anyone can help it would
    > > be much appreciated.

    >
    > Are you compiling it yourself? If so, you could try compiling with the
    > symbol table intact and then run it in the debugger. That would at least
    > give you more information than what you've posted here. If you're trying
    > to delete the list entirely, it might work better to call free() (on the
    > list pointer), instead of realloc. Are you using the forte compiler? If
    > you want to post a code snippit I could try it on mine, I've got Solaris
    > 10 and the forte compiler...


    Never call free(), malloc(), or realloc() from a Motif app. You should
    instead use XtFree(), XtMalloc(), and XtRealloc(), which eventually
    call the correct implementation of malloc and free.

    Since the problem occurs when the OP is trying to delete items in a
    list,
    rather than trying to add items, I suspect the problem is that memory
    has been corrupted some time before the offending call, and the
    reallocation fails due to that prior corruption.

    Try running with a memory checker (such as valgrind or purify) to see
    where memory is being corrupted.
    --
    Fred L. Kleinschmidt

    Since this is happening


  4. Re: realloc() crash

    On Oct 10, 3:15 pm, redor...@gmail.com wrote:
    > I am still new to all of this so please forgive my ignorance. I am
    > running an application that uses Motif 1.2.4 on a Solaris 10 machine.
    > I am using a list and when I delete the last item of a list or the
    > whole list I receive this error:
    >
    > Error: Cannot perform realloc
    >
    > I have tried to increase the swap size to 7GB with no luck. I am not
    > really sure what else to try, If anyone can help it would be much
    > appreciated.


    I appreciate all the suggestions but found out that all of our issues
    could be solved by using the default tools that come with Solaris 2.6.
    Moving to this actually solved more problems instead of causing them
    like I thought they would, considering what I am building against.
    Thanks again.


  5. Re: realloc() crash

    Hi all,

    I am using motif 1.2 with Solaris 10 and am getting lots of errors due to motif.
    I just wanted to enquire if motif 1.2 is supported on Solaris 10.
    I checked on net and there is a patch for solaris8/9 for motif 1.2
    But i am not sure if it is there forsolaris 10.
    Kindly provide some link that can help. I am new to this.

+ Reply to Thread