[unixODBC-support] Problem in using cursor to fetchmillionsofrows

Jerry Lam jlam at sandvine.com
Thu Apr 7 17:32:38 BST 2005


Yes, the memory usage stay fixed. It released a portion back to the OS when I call "db disconnect" about 80M. It hurts because it used 166M of memory and I'm expected it to use much less than that ~20M since I want 1 row at a time by using the cursor.

Jerry

-----Original Message-----
From: unixodbc-support-bounces at easysoft.com
[mailto:unixodbc-support-bounces at easysoft.com]On Behalf Of Eric Sharkey
Sent: Thursday, April 07, 2005 12:27 PM
To: Support for the unixODBC project
Subject: Re: [unixODBC-support] Problem in using cursor to
fetchmillionsofrows


> 166M of memory is used.
> 
> That's hurt and the memory is never released.

Many implementations of malloc()/free() don't release memory to the OS
even when freed, because they assume the application is likely to
want to malloc() it it back very soon.  This is not a bug.

If you run the same statement twice, does the memory usage stay fixed
at 166, or does it grow to 332?

Eric
_______________________________________________
unixODBC-support mailing list
unixODBC-support at easysoft.com
http://mail.easysoft.com/mailman/listinfo/unixodbc-support




More information about the unixODBC-support mailing list