Rocar Peças wrote:

Dear Friends,

I´m programming in C, Linux envirnment.

The SELECT´s results are being brought to the client by using mysql_store_result. And the result sets are being released by mysql_free_result.

The problem is: as mysql_free_result is called, the system memory is NOT actually released.

For example: I can monitor the program size in memory with "top" Linux utility (Conectiva 7.0 distribution). As the program is loaded into the memory, its size is, say, 1900Kb. Then, a select with a ruge result set is called and uploaded to the client. At this time, the program size in memory is 6000Kb. Then mysql_free_result is called. The program size in memory does not change. Isn´t it supposed to shrink back to 1900Kb?




In general I wouldn't expect the memory to shrink, what actually happens depends on the
behaviour of the underlying memory allocation routines. AFAIK the MySQL code "wraps"
the standard alloc library routines on whatever platform you're using. MySQL doesn't do
it's own memory management so whatever memory behaviour you see is that of the standard
libraries on your system.


Of course on a modern OS, the reported memory size of a process is usually the "top" address,
this can be significantly larger than the actual memory used by the process.


Thanks, folks!!!

Leandro M Neves,
Rocar Pcs Ltd, IT Manager
Sete Lagoas/MG - BRAZIL




--
From Peter Burden, [EMAIL PROTECTED]
http://www.scit.wlv.ac.uk/~jphb



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to