I have following code that is working fine in my development environment but when the code is moved to production server it give oracle "Heap Consistency Error". Can you please let me know how to debug this and reason for this?
if (TagValue[TagTable[TagLoc].Ptr2ValueTable].repetitionOutValue.length==-1)
{
TagValue[TagTable[TagLoc].Ptr2ValueTable].repetitionOutValue.value
= (char*) malloc (*CurLen+1) ;
}
else
{
more_val2 = (char*) realloc (TagValue[TagTable[TagLoc].Ptr2ValueTable].repetitionOutValue.value
, (strlen(TagValue[TagTable[TagLoc].Ptr2ValueTable].repetitionOutValue.value)+(*CurLen)) * sizeof(char));
if (more_val2!=NULL)
{
TagValue[TagTable[TagLoc].Ptr2ValueTable].repetitionOutValue.value=more_val2;
}
}