NI Home > Community > NI Discussion Forums

LabVIEW

Showing results for 
Search instead for 
Do you mean 
Reply
Active Participant
shrekt
Posts: 207
0 Kudos

memory deallocation

Hi All,

 

I am facing a problem, i read some post but not able to solve it.

 

my set up is i am building a dll, in that dll i am fetching some records from database(ODBC), DB toolkit, and taking some parameters as o/p,

 

I am calling this dll in seperate vi and generating an exe for it,

 

I am doing the DB open, fetching and then close everytime at a interval of 100 ms in dll.

 

The unusual behaviour is the memory size of the exe is increasing,

 

I used the desktop execution toolkit but did'nt get any memory leaks.

 

Observations:

1. initial memory 19,000 K and increases, to 100 000 K and more, now if i maximise it and then again minimize it then it starts from 19,000 K.

2. If i disable the DB fetching code in dll then the exe memory does'nt increase.

3. If i dont use the logic in the form of dll  but subvi then also memory dont increase.

 

Regards,

 

Shrek

 

Active Participant
TroyK
Posts: 438
0 Kudos

Re: memory deallocation

That does seem like unusual behaviour.

I can't offer a solution but maybe a little insight.

The default setting for a call library function node is to run in the User Interface thread.

That may be why resizing the front panel releases the memory.

 

You can try setting it to run in any thread. It may help, it may make it worse!

Maybe with that setting it won't even release the memory when you resize the FP.

 

It may be that the leak is in the dll.

Troy
CLD
Each snowflake in an avalanche pleads not guilty. - Stanislaw J. Lec
I haven't failed, I've found 10,000 ways that don't work - Thomas Edison
Beware of the man who won't be bothered with details. - William Feather
The greatest of faults is to be conscious of none. - Thomas Carlyle
Trusted Enthusiast
Norbert_B
Posts: 4,648
0 Kudos

Re: memory deallocation

Shrek,

 

first question:

Is this an issue or just "curiosity" why you are asking? So is the increasing memory consumption a problem?

 

Second question:

If the memory "resets" when you minimize the interface: Is it possible that you have some kind of "growing string" or table on the frontpanel showing the results of your queries?

 

Norbert

----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Member
YogeshShivarudrappa
Posts: 47
0 Kudos

Re: memory deallocation

Hi Shrekt,

 

Can you plesae upload few screen shot or vi, for better analysis..

 

Yogesh.

Active Participant
shrekt
Posts: 207
0 Kudos

Re: memory deallocation

Dear Norbert,

It is an issue and i dont have a growing string and the application is such that it is not used for user GUI and will run in backhand minimized.

 

Regards,

 

Shrenik