Re: Still some Memory leaks using Informix SE 5.0
Posted in 1995
In article <4a1n8k$q0o@cssun.mathcs.emory.edu> rflattin@ascus.com writes: >As we describe in a previous message, we encounter some memory leaks using >Informix SE on several servers (Sun SunOS 4.1.3, HP HP/UX 9.04) on a program >written in ESQL/C. > >We got several memory leaks : some memory leaks of 10 bytes, 11 bytes, 64 >bytes and 1024 bytes. > >We got responses that help us to suppress the leaks of 10, 11 and 1024 bytes >(thanks to Jonathan Leffler,johnl@informix.com, Frank >Bonk,bonk@positron.med.ge.com and Sanjay >Kumar,SOHO!dpsanjay@whitestone.raileurope.com) : we must FREE the cursor >(sqlcurs in our example). > >But we still have a remaining memory leak of 64 bytes each time we (the size >of the _SQCURSOR internal structure of ESQL/C). This structure is describe in >the header sqlhdr.h in $INFORMIXDIR/incl/esql. > >Here is our memory leak : > > 64 bytes (5 times) = 320 total bytes. > _sqrealloc (iqutil.o) > _iqnormdesc (iqdynam.o) > _iqdescribe (iqdynam.o) > testinf (esql.o) > main (main.o) > start (usr_lib_crt0.o) > >The problem comes from the EXEC SQL describe, if we suppress this statment, >the problem there is no memory leak. Try closing your database before you exit. Informix may be keeping the cursor memory cached for re-use. (Just a thought.) Scott