Hi,
I am wondering if there is anyway I could keep track of how much memory is being allocated in my program. I have been given a huge program of 5000 lines of code and asked to fix memory leak. It contains some pretty huge data structures. It is majorly for database connection, open, fetch, close. THe problem I am facing is when I use the statement "select * from [databasename] where [key] is between 1000 and 99000". In the begining it used to do a core dump then i found that it is running out of memory, i checked through the code and added some free statements to release allocated memory, I found that it just bails out displaying some 20,000 records without any warning. What I think the prob might be is even thought the memory is available it is unable to use the freed memory. I am working real hard to fix this bug any help would be greatly appreciated.
I am wondering if there is anyway I could keep track of how much memory is being allocated in my program. I have been given a huge program of 5000 lines of code and asked to fix memory leak. It contains some pretty huge data structures. It is majorly for database connection, open, fetch, close. THe problem I am facing is when I use the statement "select * from [databasename] where [key] is between 1000 and 99000". In the begining it used to do a core dump then i found that it is running out of memory, i checked through the code and added some free statements to release allocated memory, I found that it just bails out displaying some 20,000 records without any warning. What I think the prob might be is even thought the memory is available it is unable to use the freed memory. I am working real hard to fix this bug any help would be greatly appreciated.