Hi Jim,

Thanks for your valuable feedback. We are running this code in Unix. The
file created after running the memory trace tool had multiple lines similar
to the following

*
*
*TIMESTAMP: time 1273763430*
*MEMORY: -1*-1: malloc 56 to 110043c30 at jlibCOUNT_UNIX_UTF8.c,337*

But am not able to understand the output:-).
As for your question "are you freeing the memory somewhere else?". We
allocate memory 2 times. First time with the maximum size then the original
message size, which will be lesser than the maximum size. At the same time
we will be looking into the possibility of usage of Java version. Thanks for
your suggestion.

Bensly


On Thu, May 12, 2011 at 8:26 PM, Jim Idle <[email protected]> wrote:

> You would need to post more code than that one line to get any help. But
> if you are running this on Linux, then use valgrind to work out your
> issue. You can also look in to the jBASE memory trace tools but I am not
> sure if they are not just internal tools for jBASE developers.
>
> I can pretty much guarantee you that you have corrupted memory though -
> are you freeing the memory somewhere else? Overwriting this because 1000
> is not enough (zero termination etc)? TEMENOS have an MQ Server interface
> already don't they? Maybe you would have more success using the Java
> version.
>
> Jim
>
> > -----Original Message-----
> > From: [email protected] [mailto:[email protected]] On Behalf
> > Of Bensly
> > Sent: Wednesday, May 11, 2011 10:50 PM
> > To: jBASE
> > Subject: T24: Error Trap 2 faced while STRING_RESIZE_VBI is executed.
> >
> > T24 Error faced:
> >
> > JDIAG OUTPUT:
> >         jdiag - jBASE diagnostic '$Revision: 1.15 $'
> >
> > System Information
> > ==================
> >
> > System                      : AIX che-aix3 1.6 00CEB51C4C00
> > OS Release                  : 6.1.0.0
> > UNIX User                   : jdavidar (uid 205, euid 205)
> > Tty name                    : /dev/pts/15
> > Time                        : Wed May 12 11:04:35 2010
> >
> > Environment
> > ===========
> >
> > JBCPORTNO                   : Not Set
> > JBCRELEASEDIR               : '/opt/jbc503'
> > JBCGLOBALDIR                : '/opt/jbc503'
> > JEDIFILENAME_SYSTEM         : '/opt/jbc503/src/SYSTEM'
> > SYSTEM File is (DICT)       : '/opt/jbc503/src/SYSTEM]D'
> > RELEASE Information         : Major 5.0 , Minor 3 , Patch 0081 (Change
> > 49612)
> > Spooler dir (JBCSPOOLERDIR) : '/opt/jbc503/jspooler'
> > JBCEMULATE                  : 'prime'
> > Object path (JBCOBJECTLIST) : '/usr/mqm/lib64:/env/sem/bnk/bnk.run/
> > globuspatchlib:/env/sem/bnk/bnk.run/lib:/env/sem/bnk/bnk.run/
> > globuslib:/env/sem/bnk/bnk.run/lib:/env/sem/bnk/bnk.run/vinlib:/env/
> > sem/bnk/bnk.run/semlib'
> > jBASE Compiler Run-time     : '/opt/jbc503/config/system.properties'
> > Program dir (JBCDEV_BIN)    : '/env/sem/bnk/bnk.run/sembin'
> > Subroutine dir (JBCDEV_LIB) : '/env/sem/bnk/bnk.run/semlib'
> > Max open files              : 65534
> >
> >
> > I have the following code part in a C code and have created shared
> > libraries for this code and calling this C from a basic routine. The
> > code is to get message from a MQ Server.
> >
> >                         STRING_RESIZE_VBI(Message, MsgMax);   //
> > Allocate memory to the maximum size defined. have MsgMax as 1000.
> >
> > The above line will be called multiple times as the "MsgMax" varies
> > each time. The first time the code part gets executed it was successful
> > but the next time it is called the following error is thrown.
> >
> >                          ** Error [ FATAL ] **
> >                          Fatal error at trap location 2
> >
> > Also the value in the variable "Message" is lost. Does anyone know how
> > to overcome the above error.
> >
> > Any help will be appreciated and thanks in advance.
> >
> > --
> > Please read the posting guidelines at:
> > http://groups.google.com/group/jBASE/web/Posting%20Guidelines
> >
> > IMPORTANT: Type T24: at the start of the subject line for questions
> > specific to Globus/T24
> >
> > To post, send email to [email protected] To unsubscribe, send
> > email to [email protected]
> > For more options, visit this group at
> > http://groups.google.com/group/jBASE?hl=en
>
> --
> Please read the posting guidelines at:
> http://groups.google.com/group/jBASE/web/Posting%20Guidelines
>
> IMPORTANT: Type T24: at the start of the subject line for questions
> specific to Globus/T24
>
> To post, send email to [email protected]
> To unsubscribe, send email to [email protected]
> For more options, visit this group at
> http://groups.google.com/group/jBASE?hl=en
>

-- 
Please read the posting guidelines at: 
http://groups.google.com/group/jBASE/web/Posting%20Guidelines

IMPORTANT: Type T24: at the start of the subject line for questions specific to 
Globus/T24

To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

Reply via email to