On Thu, 26 Feb 2004 15:00:31 -0500, Sergey V. Buturlakin wrote:
Happens on Linux also. The memory usage grows to over 230MB.
Art S. Kagel
> While working with lvarchar data on win32 platform I'd trap on serious
> memory leak when such data is deallocated. Here is simple ESQL/C program:
>
> #include <stdio.h>
>
> int main()
> {
> EXEC SQL BEGIN DECLARE SECTION;
> lvarchar *_value;
> EXEC SQL END DECLARE SECTION;
> char testdata[100];
> int i;
>
> for (i = 0; i < 10000000; i++)
> {
> _value = 0;
> ifx_var_flag(&_value, 0);
> ifx_var_alloc(&_value, 101);
> ifx_var_setlen(&_value, 100);
> ifx_var_setdata(&_value, testdata, 100); ifx_var_init(&_value);
> ifx_var_dealloc(&_value);
> }
>
> getchar();
> }
>
> When this program is running memory used by it's process grows extremely
> fast.
> Does anybody have any expirience with such problem ?
>
> P.S. Informix CSDK 2.80TC2 was used.
>
> --
> With best regards
> BSV