1826314 Members
3832 Online
109692 Solutions
New Discussion

Vitual memory increasing

 
SOLVED
Go to solution
Michael Steele_2
Honored Contributor

Re: Vitual memory increasing

I also, have gone back and reread everything. Since vsz is increasing you have a memory leak.

You are the developer, something in the code is not releasing memory probably because it has cross a boundary and gone into another segmant of memory not allocated to it.

This is a common coding problem. Taking more than what your proccess have been assigned and / or not releasing it.
Support Fatherhood - Stop Family Law
Dennis Handly
Acclaimed Contributor

Re: Vitual memory increasing

>I can't this function from my application while file processing it it not supporting C functions or calls, it is separate scripting language

Then you'll need to use gdb's leak detection commands directly on dsd.

>(const char *title)
>could you please let me know what is this?

Anything you want to identify that set of output.

>do I need to call this gdb from the application?

You need to invoke your program from gdb:
$ gdb dsd
set unwindonsignal on
set heap-check leaks on
set heap-check frame-count 16

r dsd-parms ...

(You can redirect stdin or stdout if you want.)

>if there is 1 record also it is increasing the virtual memory

You would expect some increase for a record. It depends on how much state you keep for each record and/or whether some records need more space than others.

If you have no control over the dsd executable, there isn't much you can do, even if you find the leak. You'll have to report it to the owners.
Bill Hassell
Honored Contributor

Re: Vitual memory increasing

Dennis has probably described the real problem. You are writing instructions to be run by the DSD interpreter. The apparent memory leak is a feature of DSD. Your code is isolated from the interpreter and may influence it's use of memory but your code can't fix the way DSD uses memory. You need to contact the owners of DSD to get a fix.


Bill Hassell, sysadmin
Satish Kumar Malisetti
Frequent Advisor

Re: Vitual memory increasing

Dennis,Bill

>>If you have no control over the dsd executable, there isn't much you can do, even if you find the leak. You'll have to report it to the owners.

I dont have control to the dsd executable , but Before writing to the product team i have to prove there is a memory leak or something causing the memory is not releasing

When tried to run the commands

$ gdb dsd
set unwindonsignal on
set heap-check leaks on
set heap-check frame-count 16
(gdb) r allocate
warning: Load module /fwdev/home/fwprod1/data/mediation/product/bin/dsd has been stripped.
Debugging information is not available.

(no debugging symbols found)
Starting program: /fwdev/home/fwprod1/data/mediation/product/bin/dsd allocate


After i am gettimg lot of warnings and then

error at (interactive):0: cannot open file: No such file or directory


Program exited normally.

attached the log for the same

Dennis Handly
Acclaimed Contributor

Re: Vitual memory increasing

>r allocate
>error at (interactive):0: cannot open file: No such file or directory

For the run command, the "allocate" would be a command line parm. Does this make sense:
dsd allocate

You probably want to create a file with all of the dsd input then:
r < dsd_input