Home > database >  Mysql function called for help, c program insert data after the memory cannot be released
Mysql function called for help, c program insert data after the memory cannot be released

Time:10-02

Detailed, I use a program to read the point cloud data, the data is large, the point cloud data into the database, mysql_stmt_execute (STMT) executes the program memory will grow is should, but mysql_stmt_execute (STMT) to end, I release the pointer to the data will be stored, the program also takes up a lot of memory, it was like after insertion, opened up a certain memory mysql internal didn't release,

Changed my. The parameters of the ini file, all useless,,,



From the top to the first picture above is the initial memory program; The second picture is performing the insert of the memory; After completion of the third picture is inserted, the storage of data structure pointer is released, the residual memory,,, is this kind of situation, a headache, so didn't insert a certain data, will increase some memory, memory, sooner or later,

CodePudding user response:

Mysql does not free memory

CodePudding user response:

You this is the program memory, not mysql memory, do not know what is your c + + is used in data access components, we this is Delphi desktop client, use firedac, his internal should be encapsulates ado or odbc, when the cursor using the server terminal, must display the closure of the data set to recover the memory, even if the data set is free the memory is not recovered at least not immediately, and don't fetch all or many records at a time, before using the cursor, if support Unidirectional using Unidirectional local data components, so no matter how much you the data set, data set memory footprint is small, almost can be ignored

CodePudding user response:

Since you say from top to bottom are program memory, that has nothing to do eye MySQL, MySQL memory, embodied in the process of MySQL
If you don't believe, can put the MySQL service stopped, the program memory ever released
  • Related