What causes memory use of my program increase? (Write to Spreadshee​t? Running in LV environmen​t? External dlls? Waveform graphs?)

Hi 
  I have attached a plot for the discussion here..
  I am monitoring the memory usage by my VI thru calling a window's dll to keep checking that (Many thanks to Matt). 
  I saw raising slopes and flat (wow! First time I catch this, that's what I am expecting)
  I am thinking where could there be a reason for memory growing up!
What I did:-
1. Mostly use queues (all limited # of elements) for parameters delivery between loops and between subVIs
2. I close Obtained queue ref. every time I finish with it (only leaving a few keeping alive so they won't be killed)
3. For all arrays I initialized with a fixed size array constant and do all jobs with Replace subset, Index Array and that In-place block.
Above are measures I intended to use to save memory.
  However for a few points I think there might cause a memory grows, and I wish that someone can share with me your experience or give me an answer...
1. Write to spread file:-- I keep using this to log data, events into harddisk, in my use I always append new logs/data to the existing file, however I keep doing it all the time throughout the run-time.
2. Running my program in LV.exe -- I havn't compiled it yet. However when I was taking the plot's data, my PC is left with no one using it.
3. There is a couple of external dlls running -- however it sounds to me from other's view point, external dll's resource doesn't count into Labview.exe. Since I am monitoring Labview's memory use, that couldn't be a source of the raising I see from this plot, right?
4. Waveform graphs -- I am not sure whether this can be a problem. Everytime I feed data into a waveform control, I initialized a constant array and then replace elements into it, I don't think my data source is casuing any problem.
  Can someone comment on my above descriptions of my program?
Raymond

vgbraymond wrote:
1. Write to spread file:-- I keep using this to log data, events into harddisk, in my use I always append new logs/data to the existing file, however I keep doing it all the time throughout the run-time.
Write to spreadsheet file is a high level VI that opens and closes the file with every call. I would recommend to open the file once at the start of the programs, then append using lowlevel functions. Close the file after the program is done.
Have you done any profiling to see which subVIs shows the bulk of the memory use?
You might also turn off debugging to see if it makes a difference. Don't open the front panel of subVIs (and avoid functions that force the front panel to be in memory) unless they need to show something important to the user.
It would really help if we could see some actual code. Can you strip it down to the essentials that still show the problem?
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • What is the uses of this programe(accelerometer)?

    what is the uses of this programe(accelerometer) in N95 original or N95 8g and from where I can get it?

    This is Rotateme, but needs to be signed.
    http://www.bysamir.fr/rotateme/
    This is the movingball which just needs to be installed (doesn't require signing).
    http://research.nokia.com/files/MovingBall_Example.sisx
    Nokia N95
    V 20.0.015
    0546553

  • How can I use a Java program to write an executable Applescript

    I'm using a PC with Windows XP. I'm a private developer. I've written a project in Java and wish to deploy it to other people using email. I've written an Install program (the Main-Class) and successfully packed this in a jar file with the project class files and some data files all as described in the deployment trail in the Java Tutorials. A recipient with a Mac with OS X downloads the jar file and runs it to install the project class files and some data files. The install program then writes an Applescript file (Vocab.scpt shown below) on the Desktop to make starting my downloaded program easier but it doesn't seem to work and I think it may be because the script file is not "executable". Could this be the case? If so, how could I change my install program to make the script file executable or alternatively use some other system to start the downloaded program?
    Vocab.scpt:-
    # Script to start: Vocab Version: 1.0.0
    do shell script "cd /Applications/Vocab; Java Vocab"
    Many thanks for your interest. Unfortunately I don't have a Mac to experiment with this problem and although I have spent some days on and off trying to find an answer in the mass of information available on Apple's website I can only find small clues here and there to answer my problem (which I would have thought was quite a common one). In Windows a batch file (eg. Vocab.bat) is automatically executable.

    I didn't expect you to have your customer run the command. I would expect you to create the executable and install it. However, there wouldn't be any difference in what you are creating and the .jar file. Either way it is a faceless icon. For that matter, it is no different than a batch file on Windows. I'm not sure what they wouldn't understand with, "copy the Vocab.jar file to wherever you want and double-click it to run the program." In addition, you probably ought to point out that Java is not installed on Mac OS X Lion (10.7.x) and when they double-click the jar file (or whatever you send them), the system will ask if they want to install Java.
    What you really need to do is package up the app inside a Mac application package and provide the user with the application on a .dmg (disk image). Take a look here: http://developer.apple.com/library/mac/#documentation/Java/Conceptual/Jar_Bundle r/Introduction/Introduction.html#//apple_ref/doc/uid/TP40000884
    I also found this which uses ANT to create the bundle: http://informagen.com/JarBundler/

  • How Can I increase memory used by director?

    Hi
    I have a tool, written in director, that imports all
    imagefiles from a
    folder and its subfolders into director cast
    It worked since years without any problem
    But now I have following problem - if the amount of files is
    big enough,
    director is out of memory, can not create any new member more
    I do it like this
    repeat with i=1 to cFileList
    cFile=cFileList
    mem = new(#image, myCast)
    mem.importFileInto(cFile, [#trimWhiteSpace:FALSE,
    #remapImageToStage:FALSE])
    mem.name=cFile
    end repeat
    At some moment command
    mem = new(#image, myCast)
    fails, it can happen on 500-th file in the list, or an 570-th
    or on some
    other point. So the problem is not in some definite file, but
    in memory. How
    can I avoid this problem? Can I purge the memory, used by the
    program till
    that moment or is there any other way do to it?
    Any help will be appreciated

    Look up save castlib. put this in your loop and and maybe try
    i mod 10 so it
    only saves every 10 times. This should pull the images from
    ram to disk, and
    sort of purge the memory for you.
    Timm
    "Jorg Mann" <[email protected]> wrote in message
    news:emof0k$cqh$[email protected]..
    > Hi
    >
    > I have a tool, written in director, that imports all
    imagefiles from a
    > folder and its subfolders into director cast
    > It worked since years without any problem
    > But now I have following problem - if the amount of
    files is big enough,
    > director is out of memory, can not create any new member
    more
    >
    > I do it like this
    >
    > repeat with i=1 to cFileList
    > cFile=cFileList
    > mem = new(#image, myCast)
    > mem.importFileInto(cFile, [#trimWhiteSpace:FALSE,
    > #remapImageToStage:FALSE])
    > mem.name=cFile
    > end repeat
    >
    > At some moment command
    > mem = new(#image, myCast)
    > fails, it can happen on 500-th file in the list, or an
    570-th or on some
    > other point. So the problem is not in some definite
    file, but in memory.
    > How
    > can I avoid this problem? Can I purge the memory, used
    by the program till
    > that moment or is there any other way do to it?
    >
    > Any help will be appreciated
    >
    >

  • Oracle 11g - Memory used for sorting

    Hi everyone,
    I would like to know how I could analyze memory used for sorting in Oracle 11g. When I run the below query, it returns 1531381.
    select value from v$sysstat where name like 'sorts (memory)';But when I check sort_area_size parameter from v$parameter, it returns 65536. Does it mean my database is using more memory for sorting than sort_area_size. Or is the way I interpret v$sysstat view and sort_area_size wrong? What is the best way to monitor the memory usage for sorting? Thanks in advance.
    Regards,
    K.H
    Edited by: K Hein on Apr 5, 2012 8:16 PM

    check the valuse of pga_aggregate_target
    http://docs.oracle.com/cd/B19306_01/server.102/b14237/initparams157.htm
    Note:
    Oracle does not recommend using the SORT_AREA_SIZE parameter unless the instance is configured with the shared server option. Oracle recommends that you enable automatic sizing of SQL working areas by setting PGA_AGGREGATE_TARGET instead. SORT_AREA_SIZE is retained for backward compatibility.
    What is the best way to monitor the memory usage for sorting? try v$sort_usage
    or v$tempseg_usage
    col sid_serial for a44
    col size for a22
    col SID_SERIAL for a22
    SELECT b.tablespace,
            ROUND(((b.blocks*p.value)/1024/1024),2)||' MB' "SIZE",
            a.sid||','||a.serial# SID_SERIAL,
            a.username,a.osuser,
            a.program
       FROM sys.v_$session a,
            sys.v_$sort_usage b,
            sys.v_$parameter p
      WHERE p.name  = 'db_block_size'
        AND a.saddr = b.session_addr
    ORDER BY b.blocks;

  • What is the Use of u0093Over write CC Areau0094  In the Assign'of C.Code to CC area

    Dear GURU’s
    In the Assignment of Company code to Credit Control area what is the use and meaning of “Over write Credit control Area” field. Kindly guide me with an example.
    When I checked in “F1” it is saying that
    "Indicator: Can credit control area be overwritten?
    Use
    If you set this indicator, you can overwrite the credit control area defaulted from the company code's global data.
    This applies only to document posting.
    When making changes to documents, you cannot change the credit control area."
    I did n’t understand what does it mean.
    Regards,
    Bhanu

    Hi Bhanu,
    There is a option to enter the Credit control area in the company code global parameters(OBY6).When you do this,when ever you did not enter a credit control area or the system could not determine one, the cerdit control area is defaulted from the OBY6 screen.
    Now if you want to overwrite this defaulted value,you can check box this.
    Hope im clear
    Thanks
    Aravind
    Assign points if useful

  • Problems using LIBRARY to access external DLL

    Windows 2003, Oracle 10g and 11g.
    We have an external dll that we can call using 'create library' and a wrapper function. The wrapper functios works well from SQL*Plus - our function is executed and the external dll does its work.
    When we add the function to some Apex processing, the session hangs at the point at which the wrapper function is invoked and control never returns - we have to kill the database session.
    Any ideas as to what might be happening? I thought that a permissions error would be returned immediately, I don't know what would just make the session hang.

    Windows 2003, Oracle 10g and 11g.
    We have an external dll that we can call using 'create library' and a wrapper function. The wrapper functios works well from SQL*Plus - our function is executed and the external dll does its work.
    When we add the function to some Apex processing, the session hangs at the point at which the wrapper function is invoked and control never returns - we have to kill the database session.
    Any ideas as to what might be happening? I thought that a permissions error would be returned immediately, I don't know what would just make the session hang.

  • Maverick OSX: Memory use is increasing without running programs

    I noticed that under Mavericks, my iMac is getting slower and slower. So I opened the Activiy Monitor to see what was going on. It appears that the amount of used Memory is increasing without that I even run 1 single program. While writing this post, my 16 GB of ram is already used till 4.20 GB. That number is growing while looking at it till it will reach the 15 GB used after which all I can do, is restart the Mac.
    So it's impossible to use the Mac under Mavericks rigght now. I made a new partition on the HD and installed Mountain Lion so I can do at least some work, but I really hope this problem will be fixed in an update.

    Thanks for the screenshot. That looks alright at the moment with just ¼ of your RAM used. Though I expect this is because you have just booted into 10.9 and not let it 'warm up' yet.
    kernel task is a general memory environment that will accumulate memory with every new loading of external devices and software extensions. Though it should also release memory when required.
    Following is some general information on kernel task by Topher Kessler,
    http://reviews.cnet.com/8301-13727_7-20091848-263/kernel-task-taking-up-ram-in-o s-x/
    Generally every new upgrade uses more total RAM, just as every new version of Safari, for example, is a larger download than the previous version. It seems a rule that increased software upgrades are proportional to increased memory demand.
    Given this rule, you can then apply to it, 'the law of dimishing returns' which leads to a point where the hardware, a fixed quantity, becomes constrained with additional software upgrades (the variable) such that no benefit is achieved.  But this is theory.
    Practically, as you have two OS's available, you can conduct dual exercises with usage of same applications over same time, and record the memory impact from Activity Monitor in both 10.7 and 10.9 and from there you may see where the newer OS is failing you. There may be a particular application that stands out as being RAM hungry in 10.9 but stretch its legs and see if any one thing is as fault.. Some people have found Safari to be a memory hog. You certainly have a lot of RAM to play with, so something must be consuming it. So if you have time to waste exploring this, you will get a result for sure.

  • The first time I open firefox memory used is about 58000k. and an increase of approximately 122000k +. is this normal? if not what is normal memory used for firefox?

    memory used in firefox

    That depends upon the homepage you have set, but with the default about:homepage you should see like 60,000 Kb with Firefox 7.

  • Some emails from a particular sender causing Outlook 2010 to hang, task manager shows memory use spikes

    Posting this to the Exchange forum because I'm hoping there's a server-side solution.
    SOME emails received from an external sender (gmail.com address, not sure the mail client) are causing Outlook 2010 to hang when trying to open the email.  Outlook becomes non-responsive when viewing the email through the preview pane or by double-clicking
    the email.  If I open Task Manager I see that the outlook.exe process memory use starts increasing very quickly.  As far as I know the only resolution is to end the task and re-open Outlook (and avoid that email).
    I've found several excellent threads on these same symptoms, but there seems to be a variety of causes.  I've tried a bunch of things so far:
     - Tried opening from another system on our network running Outlook 2010, same issue. 
     - Tried opening from OWA, opens fine.
     - Tried exporting the email to a PST, then opening from a completely different system outside of our network, but still running Outlook 2010, same issue.
     - Tried exporting the email to a PST then opening from a completely different system outside of our network, running Outlook 2013, email opens fine.
     - Tried setting Outlook to open all emails as PLAIN TEXT, opens fine.
    Systems are running the latest Outlook 2010 SP and patches, and running a variety of OS's.  Only common denominator seems to be Outlook 2010.
    I was hoping to find a way to convert incoming emails from this sender to open as Plain Text using a Hub Transport rule, but cannot find a way to do it.
    Unfortunately I have no control over the sender, so don't know what could be triggering the problem.  
    Can anyone advise on a possible solution?  Any way to someone convert emails from a particular sender to Plain Text automatically?

    Either you inform the sender to configure in sender's outlook to send only to you in plain text please check this
    http://office.microsoft.com/en-001/outlook-help/change-the-message-format-to-html-rich-text-or-plain-text-HA101992313.aspx
    Or
    Call a macro in your outlook example below. Please check
    this for details
    Dim msg As MailItem
    For Each msg In myNS.GetDefaultFolder(olFolderInbox).Items
       If msg.Unread = True And _
         msg.SenderName = "Linda Cooper" Then
    Item.BodyFormat = olFormatPlain
       Else
         ' Message doesn't meet criteria.
       End If
    Thanks,
    MAS
    Please mark as helpful if you find my comment helpful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you.

  • How to deallocate memory used by the labview program?

    Hi,
    I have bulit a large application in labview 2012 that uses a couple of subvis, local and global variables, some uninitialized shift registers (functional global variables) and some c++ and .net dlls as well. When I open my application the memory usage shown at Windows task manager is around 1.4GB. After running the application and enabling all processes used in the application, the memory usage goes up to 1.55GB but when i stop the application, memory is never released/deallocated until i close the application plus exit labview. Can you suggest how to deallocate this memory? and how can i use the request deallocation function for this application? labview help says i have to place it inside a subVI for which i want to deallocate memory. But i have a lot of subVIs used in my application. I tried placing it in the top level VI and called it after stopping all processes but it didn't work... I am also closing references to all of the .net dlls at the end. Any workarounds??
    Thanks

    sandee wrote:
    When I open my application the memory usage shown at Windows task manager is around 1.4GB. After running the application and enabling all processes used in the application, the memory usage goes up to 1.55GB but when i stop the application, memory is never released/deallocated until i close the application plus exit labview.
    You already got some good advice. One thing that was not clear was how you are measuring memory. Since the task manager is capable of showing the memory used by LabVIEW alone (you simply need to look elsewhere), and you said that the memory gets released when you exit LabVIEW, you gave the impression that the 1.4GB was the LabVIEW portion.
    OK, so a couple of hundred MB used by LabVIEW is really nothing to worry about. Are you running into memory or other performance problems? What are the symptoms?
    sandee wrote:
    I have bulit a large application in labview 2012 that uses a couple of subvis, local and global variables, some uninitialized shift registers (functional global variables) and some c++ and .net dlls as well.
    We really need to see some code. It is very well posssible that you have a lots of unecessary data copies in memory due to sloppy programming. How big are the data structures? Do you use local variables for big data structures? What does the program actually do?
    LabVIEW Champion . Do more with less code and in less time .

  • 10.10.1  I use sysctl.conf to increased shared memory.  10.10.1 does not read sysctl.conf anymore

    I need to increase shared memory.  In 10.10  is use /etc/sysctl.conf with a line   kern.sysv.shmmax=16777216 and this works.  Also in 10.9.  But in 10.10.1 shared memory can no longer be increased from the default 4194304 by this means.
    The question is simple:   how in 10.10.1 does one increase kern.sysv.shmmax  in a way that survives a re-boot

    I have the same problem on my windows 2003 server but the
    thing is that I have not been able to get the same error on any
    other machine including a windows 2003 I installed on VMWare on the
    same machine. I have narrowed down to where in the encoder this
    happens. The encoder uses page file backed file maps to register
    session information. The call to MapViewOfFileEx method of the
    Win32 API fails with the "access denied" error. Whatever it is,
    it's due to some defect in the Windows installation I have because
    I do not get that message on any other windows installation even
    the ones I do with the same windows CD !
    I am still trying to find out what the defect might be but I
    thought you should know it's got nothing to do with you Windows
    make and model...it happens for me on 2k3 and for you on XP...so
    you should looke elsewhere..

  • How to see what processes are using my memory?

    I recently added more RAM to my system and I always keep Activity Monitor running with the memory usage icon on the Dock to see how much Lion and my programs use.
    I noticed that even several CS5 programs running at the same time won't use that much, the program I've seen uses the most is Aperture, using anywhere from 500MB on start to 2.5GB while viewing--not editing--photos.
    My questions is, when my system is running normally it uses from a quarter to half the total memory available but just now it's using more than three quarters and it's running not even half programs I use everyday. I quickly added up the memory being used and it's just missing out A LOT. I'm adding a screenshot of Activity Monitor for you to see.
    I now that restarting the system (or by using the purge command in Terminal) will free up memory but this really puzzles me and I'd really like to know what's happening--BTW, even though several GB are missing, the computer is nowhere nears slow, at least.
    Where are all the other processes using the rest of the memory?
    I'm using OS X 10.7.3 Server with 16GB of RAM on an iMac.
    Thanks for all your help,
    Gustavo.

    You will never be able to get those numbers to add up.  This topic has come up before.  Examples:
    Memory used by unknown processes
    Where is my memory?
    And others.  You cannot use the numbers in that display to add up.  Even doing top in terminal produces conflicting numbers.  Many process are dynamic and may be missed in these displays.
    FWIW, here's an apple article on the Activity Monitor memory display:
    Using Activity Monitor to read System Memory and determine how much RAM is being used
    Editorial: In my opinion I do not recommend always running Activity Monitor (or top).  The constant poling and display does have some affect on performance and cpu utilization.  That's why it always usually appears near the top of the process list when sorted by percent cpu unless really outweighed by something much bigger.

  • Can Java program cause memory leak?

    Can Java program cause memory leak or memory crash? I don't mean any memory overflow related exceptions. I mean something like core dump in UNIX or error reports in Windows XP.
    If it can really happen, in what circumstances? I raise such a question because our J2EE based system had really caused memory leak in Windows XP systems, but so far we still fail to troubleshoot the problem.

    Your code may leak memory. There are many, many, many reasons this could be. All of them represent bugs in your code.
    You should get a profiler to identify the problem spots of your code.
    You spoke of a memory crash as well. The VM may crash with some bug in the VM, or a bug in native code but that is not relevent to your problem. A memory leak is a problem in your code.

  • Why Loop execution of ActiveX method cause memory usage increase dramatically?

    hi,all
    I have tried a simple structure as follow:
    ActiveX Control is TeeChart Control which is widely used in Delphi
    env.
    ActiveX Control Ref |------------------------
    | |
    | ActiveX method |
    | |
    | |
    | |
    | i stop->@ |
    As the loop execut
    ing, memory used by labview increase 4k/second
    and several
    minute later, it has used up 100M!!
    I can confirm that ActiveX Control is Valid cause no problem occure
    in VB or Delphi.
    I google the web and found that many people have been puzzled by
    such problems. Is it a bug in Labview?
    Software :
    LabView7.0
    TeeChart ActiveX Control V5
    WinXP
    Hardware:
    AMD Athlon
    256M SDRAM
    Any reply be appreciated!

    > ActiveX Control is TeeChart Control which is widely used in Delphi
    > env.
    I like the picture, but couldn't tell if your ActiveX method was
    returning other refnum values which it allocated and expected LV to
    Close. This is the most likely cause. So, I'd inspect each of the
    return values, and if any of them are refnums or are being cast to a
    refnum and used as one, be sure it gets Closed. Other things like
    arrays should either be converted into LV arrays and released, or if
    unwired, they should be released. If you have excluded the problem with
    refnums, you might look at the unwired inputs and wire them temporarily
    to the edge of a sequence or something just to see if the problem gets
    better or worse. Please report anything that you find that
    doesn't look
    correct.
    Greg McKaskle

Maybe you are looking for

  • Will doing a teathered restore to iOS 5.1.1 help my battery life?

    OK I waited over a month to update my iPhone 4s to iOS 5.1.1.  I did an OTA update (Which I think was my problem)  I got hit with the battery drain bug that apparently comes with an OTA update of the OS. I Did the following: 1. Full backup to iTunes

  • No soap with my php

    I was disappointed to find that Leopard's Apache2 configuration (once you turn on PHP) does not include PHP Soap. I'm pretty sure Soap is included in PHP 5.2.5 builds and later... but, alas, Leopard comes with 5.2.4. I was able to find a workaround t

  • What is better to use for school, an ipad or a laptop?

    Hi, I'm in highschool and I am into technology. I use an hp laptop for school, but its kind of big and takes a minute to turn on. It seems like the iPad would be faster ad easier to carry around. I was wondering which is better for taking notes durin

  • VAT and CST details for Company Code

    Hi All I have a requirement to store following details at the company code and plant level in SAP ECC for India implementation. Can someone please guide me where can I store these information in SAP ECC 6. VAT - Plant Level CST - Plant Level TIN - Co

  • Error when running WebServicesAssembler.jar

    I want to setup a web service for a simple database query. I've modified the sample (C:\ORA_DEV10g\webservices\demo\demo\basic\db\sqlstatement\config.xml) for my needs (other database & table): When I run the WebServiceAssembler I get the following e