What is memory leakage?

hi
can any one tell me what is memory leakage?
thanks in advence

if you want more information you will need to ask a more specific question. Your question was as general as it can get, so the response was equally generalized.
To correct the response, memory leakage does not have to be memory that your application isn't using, it is memory that your application fails to release when it is done with it. Think about objects that are never used again but you keep a reference to them somewhere in your code so the garbage collector doesn't clean them up.
Another example is when you have to explicitly call a close() method to cleanup some resource. For example, you open a FileInputStream but you forget to close it when you are done with it so the file handle it is using cannot be reused until your program ends.

Similar Messages

  • Are there any good tool for checking security risks, Code review, memory leakages for SharePoint projects?

    Are there any good tool for checking security risks, Code review, memory leakages for SharePoint projects?
    I found one such tool "Fortify" in the below link. Are there any such kind of tools available which supports SharePoint?
    Reference: http://www.securityresearch.at/en/development/fortify/
    Amalaraja Fernando,
    SharePoint Architect
    Please Mark As Answer if my post solves your problem or Vote As Helpful if a post has been helpful for you. This post is provided "AS IS" with no warrenties and confers no rights.

    Hi Amalaraja Fernando,
    I'm not sure that there is one more tool that combines all these features. But you may take a look at these solutions:
    SharePoint diagnostic manager
    SharePoint enterprise manager
    What is SPCop SharePoint Code Analysis?
    Dmitry
    Lightning Tools Check
    out our SharePoint tools and web parts |
    Lightning Tools Blog | Мой Блог

  • Memory leakage with swing

    We have developed a applet using swing componenets . We have used dispose, callled gc() and made references null and removed the listeners to enable the components for garbage collection. We have used windows NT. When we see the task manager the memory usage only increases as we work on the applet. When we minimize the browser and maximise it again then the extra memory is releaased but as long as we work on the browser though we have done lot of things the memory usage in task manager only increases. Can you help us out. What are the reason for memory leakage . Why the memory is not released by the jvm to OS. Is it designed that way. What are the precautions to take. We use JDK1.2 for developing and run the applet with the jre1.2 and jre1.3 plug in installed on the windows nt system
    Thanks in advance

    Hi there
    This topic has been discussed several times before
    Basicly this is it
    The GC knows it is sluggish (well those who built it any whay)
    therefor it will not clean up until it is necessary
    therefor your memory for the JAVA app will grow in
    memory size (as long as there is more room why clean?)
    When you start/close another program the OS will
    demand more memory and the GC will run cleanup. How effective this cleanup realy is
    depends on the situation.
    To make things easier for the GC you should as you state
    clean all referenses etc
    If you whant to start another memory consuming program
    you should start it before the Java App. then the memory that is available for the Java VM is limmited.
    There are also whays to set the maximum / minimum memory for the Java VM
    Markus

  • Memory leakage with oracle oci driver

    I have developed a Solaris8 client/server application using the JAVA IDL CORBA implementation. The client sends requests to the server to update the database (database is Oracle 8.1.7 and I connect to it using oci oracle drivers). Requests are sent one at a time. No concurrent connections. I have a static connection that I establish with database once I start the server. If that connection is lost for any reason (timeout or database faliure) the application tries automatically to reconnect to database. I have noticed that if the new connection to database fails and an sql exception is thrown, memory used by the application process increases. This memory is not garbage collected so application hangs. I tried similar behaviour with the oracle thin driver and things went fine. There was no memory leakage.
    I would really appreciate, if you can help me in this since I can't use the thin driver because of failover limitations.

    I have noticed
    that if the new connection to database fails and an
    sql exception is thrown, memory used by the
    application process increases.
    How have you noticed this?I noticed this using the command pmap under solaris it operating system
    every time I test reconnecting to database I go and check the memory used by the application before after attepmting to reconnect:
    /usr/proc/bin/pmap [myapp pid] | tail -1
    If I'm using normal connection then the memory will be increased by 100KB. If I'm using the OraclePooledConnection class then the increase will be something like 500KB. Again this is if still there is a problem connecting to database. If connection to database is okay then no memory increase at all.
    This memory is not
    garbage collected so application hangs.
    Then it isn't a java problem. When java runs out of memory it throws a out of memory exception.Well I'm not saying it is a java problem for sure. I suspect that it might be oracle oci8 driver problem. I would appreciate if anyone can help in specifying teh source of the error.
    I tried
    similar behaviour with the oracle thin driver and
    things went fine. There was no memory leakage.
    I would really appreciate, if you can help me in this
    since I can't use the thin driver because of failover
    limitations.
    I don't understand that last sentence at all.What I mean here is that instead of using the oci8 driver to connect to database I used the thin driver and kept everything else the same. I simulated the faliure to reconnect to database and based on the pmap command observations there was no memory leakage.
    I want to know what is needed to be done in order to get a normal behavior once using the oci8 drivers.

  • Memory Leakage - coreaudiod

    Is anyone else having memory leakage under snow leopard?
    "Activity Monitor" nominates the process "coreaudiod" is using 13.95GB of the available 16GB of RAM.
    Any idea of what is happening? Any help will be great. Cheers...

    if you reboot your mac does the coreaudio memory start small and grow over time? that would be the characteristics of a memory leak. But if you bounce the mac and it's at 13.95GB on restart then that is something else.

  • Memory Leakage Detection

    Hi,
    Want to know how can I detect any memory leakage using any profiler. There are so many links on the net but there is no simple documentation on net that gives simple steps to detect any memory leakage.
    Also most profilers do not show how many Garbage Collections an object has survived. This information could be critical in deciding memory leakage. What they show is how many objects are there in the Heap. If there are 10 String Objects in the heap after 1 min. of program start and 50 Objects after 2 min. (after invoking GC), this could be due to the normal activity of the program and not memory leakage.
    Pls remember any response to this thread would be beneficial to lot many Java guys I know with even 6-9 yrs. experience would want to know. So Instead of giving links to any site, I would appreciate if anyone can explain this in some simple language.
    Thanks,
    AA

    You don't have to launch Instruments from Xcode. To get started detecting memory leaks with Instruments, launch Instruments. A sheet will open asking you to choose a template. Select Leaks and click the Choose button.
    In the lower left corner of the trace window are three buttons. Click the right one. Doing so will open the detail view, which will let you configure how Instruments detects the leaks. Instruments is initially set to auto-detect leaks, and it checks every 10 seconds. This setup could be the cause of your problem where Instruments doesn't find any leaks. Your small test program may be finishing before Instruments detects the leak.
    After you get the trace configured, go to the Default Target pop-up menu in the trace window toolbar. Choose Launch Executable > Choose Executable. Select your app and click the Record button to start tracing.
    If Instruments doesn't work for you, there are alternatives for Mac applications. MallocDebug can detect memory leaks, and it's installed with the Xcode Tools. leaks is a command-line application that detects memory leaks. Valgrind is available for Mac OS X, and it detects memory leaks.

  • Stand alone weblogic keeps running out of memory ! Cause of Memory Leakage?

    Hi all,
    I have a machine with 16gb ram and 500gb hard disk with linux os. I have installed weblogic server in it with an adf application deployed on it. So now the problem every two weeks the machine keeps running out of memory . Could it be because of connection leakage ?
    There are only a couple of people accessing the application time and again.
    When i checked for the data source connection count in weblogic server under data sources , it mostly shows around 10 - 20 connections.
    What are various reasons for leakage of connection in ADF application ?
    I have not made any explicit jdbc calls in our application .
    There is a couple of PL/SQL calls to an external api(this is done in the application module) through db links and rest all is just plain accessing of application modules and view objects .
    So what could be the reason if any memory leakage is occuring ?
    My application module configuration is
      <AppModuleConfigBag ApplicationName="model.am.AuthenticationAM">
          <AppModuleConfig jbo.project="model.Model" DeployPlatform="LOCAL" name="AuthenticationAMLocal" ApplicationName="model.am.AuthenticationAM">
             <AM-Pooling jbo.ampool.maxinactiveage="300000" jbo.ampool.initpoolsize="44" jbo.ampool.maxpoolsize="60" jbo.recyclethreshold="40" jbo.ampool.minavailablesize="0" jbo.ampool.monitorsleepinterval="120000"/>
             <Database jbo.locking.mode="optimistic" jbo.TypeMapEntries="OracleApps"/>
             <Security AppModuleJndiName="model.am.AuthenticationAM"/>
             <Custom JDBCDataSource="java:comp/env/jdbc/ConnectionDBDS" jbo.rowid_am_datasource_name="java:comp/env/jdbc/ROWIDAM_DBDS"/>Thanks in advance
    Sam
    Edited by: Sam47 on 19-Oct-2012 01:46

    Hi Suspito ,
    Thanks for the link ..
    Is that the standard configuration for weblogic server?
    If at all there are connection leaks in the application in the weblogic server under datasource will it show the count of all the database connection open ?
    -Sam

  • How do I get out of kernel panic?  kernel panic upon boot.  I did that hard drive cleanup and reinstalled Lion.  What about memory?  Anyone think I need to upgrade my memory?  I have 8gig.

    I get kernel paic upon boot.  I did that hard drive cleanup and reinstalled Lion.  What about memory?  Anyone think I need to upgrade my memory?  I have 8 G of upgraded RAM. (20 inch iMac core 2 duo)

    If you're able to boot, launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ If you’re running Mac OS X 10.7 or later, open LaunchPad. Click Utilities, then Console in the page that opens.
    Select the most recent panic log under System Diagnostic Reports. Post the contents — the text, please, not a screenshot. For privacy’s sake, I suggest you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header and body of the report, if it’s present (it may not be.) Please don't post "shutdownStall" or "hang" reports.
    If you can't boot in the usual way, try a safe boot. The instructions provided by Apple are as follows:
    Be sure your Mac is shut down.
    Press the power button.
    Immediately after you hear the startup tone, hold the Shift key. The Shift key should be held as soon as possible after the startup tone, but not before the tone.
    Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).
    During startup, you’ll see a progress bar, and then the login screen, which appears even if you normally log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Safe mode is slower than normal, and some things won’t work at all.
    Note: If FileVault is enabled under Mac OS X 10.7 or later, you can’t boot in safe mode.

  • Memory Leakage in dlls called through JNI

    I have some dll that are called through a JNI code that have a memory leakage. I need to find how much is that.
    Do we have some functions for that to find it in the code.Is that possible without making changes in the JNI code.
    I checked but all suggest a memory leakage tool.But i want to do that writing a code in Java.I have checked for the Runtime class but it only finds the JVM related memory usage and not the dll one.

    amol28 wrote:
    But i want to do that writing a code in Java.Not possible. JNI/C/C++ is not java. So you can't use java to verify it.
    I checked but all suggest a memory leakage toolEither that or you manually inspect and/or test the code yourself (in C/C++).

  • Does making objects equal null help the gc handle memory leakage problems

    hi all,
    does making objects equal null help the gc handle memory leakage problems ?
    does that help out the gc to collect unwanted objects ??
    and how can I free memory avoid memory leakage problems on devices ??
    best regards,
    Message was edited by:
    happy_life

    Comments inlined:
    does making objects equal null help the gc handle
    memory leakage problems ?To an extent yes. During the mark phase it will be easier for the GC to identify the nullified objects on the heap while doing reference analysis.
    does that help out the gc to collect unwanted objects
    ??Same answer as earlier, Eventhough you nullify the object you cannot eliminate the reference analysis phase of GC which definitelely would take some time.
    and how can I free memory avoid memory leakage
    problems on devices ??There is nothing like soft/weak reference stuffs that you get in J2SE as far as J2ME is concerned with. Also, user is not allowed to control GC behavior. Even if you use System.gc() call you are never sure when it would trigger the GC thread. Kindly as far as possible do not create new object instances or try to reuse the instantiated objects.
    ~Mohan

  • See whats taking memory

    Hi,
    I own a Lumia 900 and yesterday I noticed that I am using about 14GB of my 16GB memory, I synced my phone and migrated all my videos. Now it only uses 10GB of memory which still is too much.
    I just want to know if there is a way to see exact details of whats taking memory, most of my applications I don't use as frequent as others and I just want to know the amount each app is using so that I know what to remove and what to keep instead of going on an uninstall spree and hope for the best.
    So is there a way to do this, without jailbreaking/unlocking/rooting the device?

    Hi dahaka7,
    It's good to remove all applications that you do not use, as they may use surprisingly a lot of space on your device, especially if they are caching content or creating detailed log files. In addition to pictures, videos, applications, music and games. your phone has the operating system on the phone memory, which will reserve some of the space.
    I am afraid there is no tool that will enable you to see how much space a certain application reserves, but you can see how big the installation file is before you download it. Some games especially can be rather large, up to several hundred megabytes. So the xBox tile is a good place to start if you are looking to free up some space. 
    Hope this helps,
    Puigchild
    If you find this post helpful, a click upon the white star at bottom would always be appreciated.
    If it also solves your problem, clicking ACCEPT AS SOLUTION below it will benefit other users!

  • Memory Leakage in Conky with Lua

    Hi there, I've been experiencing ongoing memory leakage using my Conky + Lua scripts. It tends to keep accumulating memory until I kill the process and restart it. Highest I've seen it go is 10% of my 4gb of RAM, so it does get to be substantial if unchecked.
    I did google it, and it mentioned something about cairo_destroy(cr), so I inserted it at the end of functions randomly where it made sense (to my limited scripting skills) and where it didn't (just in case), but it didn't seem to make any difference.
    Here is the lua script - it creates rings as % bars, I believe it was taken from somewhere on the arch forums months ago where it was also modified.
    Ring Meters by londonali1010 (2009)
    This script draws percentage meters as rings. It is fully customisable; all options are described in the script.
    To call this script in Conky, use the following (assuming that you save this script to ~/scripts/rings.lua):
    lua_load ~/scripts/rings-v1.2.1.lua
    lua_draw_hook_pre ring_stats
    -- Background settings
    corner_r=20
    main_bg_colour=0x060606
    main_bg_alpha=0.4
    -- Ring color settings
    ring_background_color = 0x000000
    ring_background_alpha = 0.6
    ring_foreground_color = 0x909090
    ring_foreground_alpha = 1
    -- Rings settings
    settings_table = {
    name='cpu',
    arg='cpu2',
    max=100,
    bg_colour=ring_background_color,
    bg_alpha=ring_background_alpha,
    fg_colour=ring_foreground_color,
    fg_alpha=ring_foreground_alpha,
    x=50, y=55,
    radius=31,
    thickness=3,
    start_angle=-180,
    end_angle=0
    name='cpu',
    arg='cpu1',
    max=100,
    bg_colour=ring_background_color,
    bg_alpha=ring_background_alpha,
    fg_colour=ring_foreground_color,
    fg_alpha=ring_foreground_alpha,
    x=50, y=55,
    radius=35,
    thickness=3,
    start_angle=-180,
    end_angle=0
    name='memperc',
    arg='',
    max=100,
    bg_colour=ring_background_color,
    bg_alpha=ring_background_alpha,
    fg_colour=ring_foreground_color,
    fg_alpha=ring_foreground_alpha,
    x=205, y=55,
    radius=32,
    thickness=10,
    start_angle=-180,
    end_angle=-0
    require 'cairo'
    local function rgb_to_r_g_b(colour,alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
    end
    local function draw_ring(cr,t,pt)
    local w,h=conky_window.width,conky_window.height
    local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle']
    local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']
    local angle_0=sa*(2*math.pi/360)-math.pi/2
    local angle_f=ea*(2*math.pi/360)-math.pi/2
    local t_arc=t*(angle_f-angle_0)
    -- Draw background ring
    cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f)
    cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
    cairo_set_line_width(cr,ring_w)
    cairo_stroke(cr)
    -- Draw indicator ring
    cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc)
    cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
    cairo_stroke(cr)
    end
    local function conky_ring_stats()
    local function setup_rings(cr,pt)
    local str=''
    local value=0
    str=string.format('${%s %s}',pt['name'],pt['arg'])
    str=conky_parse(str)
    value=tonumber(str)
    if value == nil then value = 0 end
    pct=value/pt['max']
    draw_ring(cr,pct,pt)
    end
    if conky_window==nil then return end
    local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height)
    local cr=cairo_create(cs)
    local updates=conky_parse('${updates}')
    update_num=tonumber(updates)
    if update_num>1 then
    for i in pairs(settings_table) do
    setup_rings(cr,settings_table[i])
    end
    end
    cairo_destroy(cr)
    end
    --[[ This is a script made for draw a transaprent background for conky ]]
    local function conky_draw_bg()
    if conky_window==nil then return end
    local w=conky_window.width
    local h=conky_window.height
    local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, w, h)
    local cr=cairo_create(cs)
    -- local thick=2
    cairo_move_to(cr,corner_r,0)
    cairo_line_to(cr,w-corner_r,0)
    cairo_curve_to(cr,w,0,w,0,w,corner_r)
    cairo_line_to(cr,w,h-corner_r)
    cairo_curve_to(cr,w,h,w,h,w-corner_r,h)
    cairo_line_to(cr,corner_r,h)
    cairo_curve_to(cr,0,h,0,h,0,h-corner_r)
    cairo_line_to(cr,0,corner_r)
    cairo_curve_to(cr,0,0,0,0,corner_r,0)
    cairo_close_path(cr)
    cairo_set_source_rgba(cr,rgb_to_r_g_b(main_bg_colour,main_bg_alpha))
    --cairo_set_line_width(cr,thick)
    --cairo_stroke(cr)
    cairo_fill(cr)
    cairo_destroy(cr)
    end
    function conky_main()
    conky_draw_bg()
    conky_ring_stats()
    cairo_destroy(cr)
    end
    And this is called into conky via:
    background no
    override_utf8_locale no
    use_xft yes
    xftfont Monospace:size=8
    ## orig font cure
    text_buffer_size 2048
    update_interval 1.0
    total_run_times 0
    own_window yes
    own_window_transparent yes
    own_window_type desktop
    own_window_colour 191919
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    double_buffer yes
    minimum_size 600 90
    maximum_width 320
    draw_shades no
    draw_outline no
    draw_borders no
    draw_graph_borders no
    default_color 909090
    default_shade_color fed053
    default_outline_color 7f8f9f
    alignment br
    gap_x 30
    gap_y 50
    no_buffers yes
    uppercase no
    cpu_avg_samples 2
    override_utf8_locale no
    color1 fff
    border_inner_margin 5
    border_outer_margin 5
    own_window_argb_visual no
    own_window_argb_value 200
    lua_load ~/.conky/rings.lua
    lua_draw_hook_pre main
    Left out the conky TEXT section unless anybody desperately needs to see that too.
    If anybody can point me in the right direction with this silly thing, that would be appreciated. Thanks!
    Last edited by ugugii (2011-11-16 17:42:00)

    No I meant that the destroy functions should not be in conky_main at all. Why? Because you are using cr as an argument when you have no local cr defined. You are passing the undefined value (nil) to these destroy functions and they do nothing.
    Like I said, I don't use conky or cairo but it is generally a good idea to destroy a resource you create. If you don't you will get memory leaks because "creating" is usually vague language that comes down to allocating memory and "destroy" deallocates memory.
    This line from your own post creates a surface and stores it in the cs variable:
    local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height)
    Yet you forget to deallocate the surface stored in cs. So add a line like this after each cairo_destroy(cr):
    cairo_surface_destroy(cs)
    I hope that helps.

  • Vision OCR memory leakage

    Hi guys!
    I have a "problem" with simple OCR vi's made with Vision Assistant in NI Vision 2011.
    When I create a simple script, that only uses the OCR, and then create a .vi from it, the vi leaves the OCR session open. This results to huge leakage of RAM memory.
    You cannot even get the OCR session out from the .vi automatically when creationg the vi, so that it could be disposed outside of the .vi! So only solution I could figure out was to actually modify the .vi and build it inside there. Also the .abc file for the OCR have to be built, because it's not necessary in the same drive or base path, and Vision Assistant uses the whole path e.g. "D:\Labview Projects\OCR\... ...fonts.abc".
    It wouldn't be a problem unless I and especially others wouldn't be creating those OCR -vi's all the time. Now every vi have to be manually changed to dispose the session AND to take the .abc -file path in reference to the executable path.
    If somebody knows any solutions for this, please don't hesitate to tell me Thanks!

    Hi,
    System.gc() only suggests the objects are removed but there is no obligation for the JVM to do so.
    The implementation of different JVM's will approach this event in different ways. For example an embedded JVM might be designed to nearly alwaya remove objects that have no reference left.
    Anyway this is not strictly speaking memory leakage because if the JVM decides to it CAN remove the object.
    Real memory leakage is where a series of object references are created and not destroyed and so they persist in time because they cannot be GC'ed.
    A typical example is to create an object, stick it in an array of objects for some processing and then set the original object reference to null, thinking the object can now be GC'ed. But it can't unless the object reference in the array(which is a copy of the original object reference) is also set to null.
    Hope that helps,

  • How to find memory leakages in every screens and components in an Flex application ?

    Hi Guys,
    I was running my flex application and left it running over night.
    I noticed that it had a memory leakage issue. The memory leakage was huge upto 1.5gb
    Is there is way i can find out from where (which screen? and which component?) the memory is leaking in my application.??

    That's why FlashBuilder has a profiler.  There are some tips for use on my
    blog.
    Alex Harui
    Flex SDK Team
    Adobe System, Inc.
    http://blogs.adobe.com/aharui

  • Find memory leakage when passing Object Reference from Teststand to vi

    I am using Teststand to call labview vi, and pass ThisContext of sequence to vi as object reference, but if I just loop this step and I can find the memory using keep increasing, how can I avoid the memory leakage inside the vi.
    see my vi, it is to post message to UI.
    Solved!
    Go to Solution.

    You should be using a close reference node to close the references you get as a result of an invoke. In the code below you should be closing the references you get from the following:
    AsPropertyObject
    Thread
    Close those two references once you are done with them.
    Also make sure you turned off result collection in your sequence or you will be using up memory continually for the step results.
    Hope this helps,
    -Doug

Maybe you are looking for

  • Application Express Printing in 3.1 and Oracle 9i

    Hi, I am running Application Express 3.1 on a Oracle 9i box using application server 10.1.2 for the web server and when ever we try to do any printing to PDF files it files, changing to HTML give me the following errors; (it works fine from our 10g2

  • Acrobat 9 black type

    We normally check our PDFs in Acrobat 7, but when they are checked in Acrobat 9 (with Output preview on) black type or black areas are reading 4 colour. Are we doing something wrong?

  • Fit to Page Keyboard Shortcut?

    I'm really missing the Cntrl+0 keyboard Shortcut for "Fit Page" in Acrobat. Can't it be reimplemented? After we upgraded from Acrobat 8 (I believe) to 9 it disappeared, or rather changed to an incremental "Zoom In". I've now upgraded to Acrobat X and

  • "Command I" shortcut in Preview - designated for show/hide toolbar AND show inspector?

    In the Mac Preview App, I tried using the the 'command I' shortcut to show/ hide the toolbar, but it brings up the inspector instead. Is the shortcut is designated for both these functions?

  • BPM Monitoring/Troubleshooting

    Is there a way to monitor / troubleshoot a completed BPM process and understand thru which steps or branch did the process flow happen? In Manage Processes: Process Instances -> When one clicks on the Show Process Flow button, the graphical process v