Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Rollback in ProC caused memory leak?

Rollback in ProC caused memory leak?

From: Nick Chen <nchen_at_ccdev3.nova.att.com>
Date: 1997/04/17
Message-ID: <NCHEN.97Apr17135226@ccdev3.nova.att.com>#1/1

We recently encountered a quite intriguing memory leak problem coming from the following Oracle Pro*C routine:

	#include <sqlca.h>
	#include <DBIntf.h>
	
	long RollbackData (void *ConnectID)
	{
		long ErrorCode;
	
		EXEC SQL ROLLBACK;
		ErrorCode = sqlca.sqlcode;
	
		return (ErrorCode);
	}

Every time this routine was executed, we can observed several 32-byte nodes were added to the ever growing doubly-linked list by examining the heap memory map.

Some characteristic of our server application:

It seemed that when doing a rollback, Oracle/ProC was keeping a history or journal of some sort. And this list seemed like a privately maintained global doubly-linked list. A typical node of the list looked like the following:

	0x0000beef   0x403422c8  0x40342318   0x8b01d217
	0x00000000   0x16004353  0x0000beef   0x8b01d217

Where 0x0000beef looks like a magic word, 0x403422c8 is the left pointer, and 0x40342318 is the right pointer of a doubly-linked list. I was able to confirmed that 0x0000beef word also appeared in libsql.a so this node structure seemed to be defined in libsql.a.

Now the tough question, how do we tell Oracle/ProC not to maintained this ever growing internal list? Thanks in advance for your help.

-- 
+-----------------------------------+

| Nick Chen 703-713-2584 |
| AT&T, Herndon, VA |
| ccserve!nchen_at_polaris.attmail.com |
| nickchen_at_attmail.com |
+-----------------------------------+ -- +-----------------------------------+
| Nick Chen 703-713-2584 |
| AT&T, Herndon, VA |
| ccserve!nchen_at_polaris.attmail.com |
| nickchen_at_attmail.com |
+-----------------------------------+
Received on Thu Apr 17 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US