Hi!
"Sebastien" == Sebastien Petit <spe...@selectbourse.com> writes:
Sebastien> Hi everybody,
Sebastien> I use mysql-3.23.36 with FreeBSD-4.2-RELEASE on a PIII-800 1 Go RAM 2
DD
Sebastien> RAID 1
Sebastien> When I use mysql_store_result to retreive about 338488 rows with a
table of
Sebastien> about 23 rows and I use mysql_fetch_result to read rows, when I read
row, I
Sebastien> malloc some memory to copy the row result.
Sebastien> The problem is, when I call mysql_free_result after that,
mysql_free_result
Sebastien> doesn't free memory.
How do you see that mysql_free_result doesn't free memory?
Note that even if mysql_free_result() calls 'free()' it doesn't mean
that the memory will be available by other processes (In other words,
top or ps will not notice this). The memory will however be available
for your client applications for use in future allocations.
This is just simple how malloc()/free() works; Please do some reading
of how malloc() / free() works!
In some cases free() may free memory to the system, but this only
happens when you free blocks that are allocated last from the heap.
Regards,
Monty