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.

Similar Messages

  • Conky with Lua

    I am trying to use Conky, but I want to use lua with it.  Lua is not compiled with conky when I use pacman.  How do I solve this?

    There is one in aur that has lau otherwise abs would be the way to go.

  • 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.

  • 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 | Мой Блог

  • 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

  • [SOLVED] Error when compiling conky with audacious support

    Edit: See post #8 for solution
    Hello.
    When trying to compile conky with the --enable-audacious option, I get the following error.
    checking for Audacious... configure: error: Package requirements (audacious >= 1.4.0 audclient dbus-glib-1 glib-2.0 gobject-2.0) were not met:
    No package 'audclient' found
    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.
    Alternatively, you may set the environment variables Audacious_CFLAGS
    and Audacious_LIBS to avoid the need to call pkg-config.
    See the pkg-config man page for more details.
    ==> ERROR: A failure occurred in build().
    Aborting...
    My PKGBUILD is the one in the repos, with the addition of an --enable-audacious line. See below:
    # $Id: PKGBUILD 205494 2014-02-06 05:24:01Z bisson $
    # Maintainer: Gaetan Bisson <[email protected]>
    # Contributor: Giovanni Scafora <[email protected]>
    # Contributor: James Rayner <[email protected]>
    # Contributor: Partha Chowdhury <[email protected]>
    pkgname=conky
    pkgver=1.9.0
    pkgrel=4
    pkgdesc='Lightweight system monitor for X'
    url='http://conky.sourceforge.net/'
    license=('BSD' 'GPL')
    arch=('i686' 'x86_64')
    makedepends=('docbook2x')
    depends=('glib2' 'curl' 'lua' 'wireless_tools' 'libxml2' 'libxft' 'libxdamage' 'imlib2')
    source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz")
    sha1sums=('a8d26d002370c9b877ae77ad3a3bbd2566b38e5d')
    backup=('etc/conky/'conky{,_no_x11}.conf)
    options=('!emptydirs')
    build() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    CPPFLAGS="${CXXFLAGS}" LIBS="${LDFLAGS}" ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --enable-ibm \
    --enable-curl \
    --enable-rss \
    --enable-weather-xoap \
    --enable-imlib2 \
    --enable-wlan \
    --enable-audacious \
    make
    package() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    make DESTDIR="${pkgdir}" install
    install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    install -Dm644 extras/vim/syntax/conkyrc.vim "${pkgdir}"/usr/share/vim/vimfiles/syntax/conkyrc.vim
    install -Dm644 extras/vim/ftdetect/conkyrc.vim "${pkgdir}"/usr/share/vim/vimfiles/ftdetect/conkyrc.vim
    Note: While similar, I don't think this problem is the same as this one.
    Last edited by Sudowoodo (2014-06-29 10:07:02)

    drcouzelis wrote:Remove the "\" from the end of "--enable-audacious". Does it work now?
    No, it's exactly the same.
    drcouzelis wrote:EDIT: Also, there's already a package for conky-audacious in the AUR.
    I tried it, that doesn't compile either, and its orphan & outdated.
    For the record, its PKGBUILD is
    Edit: Remove unnecessary text. See post #8 for solution.
    and the error is the same:
    Edit: Remove unnecessary text. See post #8 for solution.
    Have you been able to reproduce the problem? I'm using an amd64 processor and trying to build with "makepkg -s". Thank you for replying.
    Last edited by Sudowoodo (2014-06-28 12:13:28)

  • 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,

  • 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

  • Memory leakage issue in Solaris

    Hi Team,
    Hope you doing good!!
    I am facing a memory leakage issue in the Solaris server configured.
    details:
    1. Frequent Increase in Memory Utilization
    2. Major Faults in System Events 189084 & Increasing.
    Server cofg.:
    Solaris 9 version 5.9,Sun Java Web Server 6.1,JDK 1.5,Oracle 10g.
    I really appreciate if you give conclusion for the above behavior of server ASAP.
    Thanks,
    Vivek
    +919990550305

    Please test it with release version as there may be a lot of things which are fixed after beta.
    Also please note down the statement cache size your application was using earlier. Starting from 2.111.7.10/2.111.7.20, the statement cache size is automatically tuned by default. This feature is called self tuning. You may disable self tuning and specify your own statement cache size as usual. To know more about self tuning, please consult ODP.NET Developer's Guide.
    I would suggest that you first upgrade to the release version 2.111.7.20. If that does not solve the problem, you may either
    - specify MaxStatementCacheSize
    or
    - disable self tuning and provide your own statement cache size

  • Memory leakage issue in Oracle-DOTNET environment

    Hi,
    One of my customer is facing a issue of memory leakage issue with their ASP.NET application. Following are the environment details
    1. ASP.NET 3.5 application (Uses some Infragistics controls for grids)
    2. SSRS for reporting
    3. Oracle Server as database (details given below)
    The memory leakage occurs while running load testing in his test environment.
    The memory is consumed (in tune of 1.2 GB) and then performance is hit.
    The memory dump is analyzed and we found Oracle client eating up a lot of memory which is not released.
    We tried to use 11g driver also but without any improvements.
    Environment Details :
    1. Oracle server version –
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE 10.2.0.1.0 Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 – Production
    2. Client version
    We are using following oracle client version SQL*Plus: Release 10.2.0.1.0 – Production
    (For performance purpose we have used following client version. SQL*Plus: Release 11.1.0.7.0 – Production)
    3. ODP.NET version
    Version of Oracle.DataAccess.dll is 2.111.7.10
    It will be great if any body can help on this issue and guide us on the right track.
    Thanks in advance.
    Thanks & Regards,
    Anoop

    Please test it with release version as there may be a lot of things which are fixed after beta.
    Also please note down the statement cache size your application was using earlier. Starting from 2.111.7.10/2.111.7.20, the statement cache size is automatically tuned by default. This feature is called self tuning. You may disable self tuning and specify your own statement cache size as usual. To know more about self tuning, please consult ODP.NET Developer's Guide.
    I would suggest that you first upgrade to the release version 2.111.7.20. If that does not solve the problem, you may either
    - specify MaxStatementCacheSize
    or
    - disable self tuning and provide your own statement cache size

  • Memory Leakage while parsing and schema validation

    It seems there is some kind of memory leakage. I was using xdk 9.2.0.2.0. Later i found that from this forum which contain a Topic on this and they (oracle ) claim they have memory leakage. And they have fixes this bugs in 9.2.0.6.0 xdk. When i used truss command, for each call to parser and schame validation, it was opening file descriptor for lpxus and lsxus file. And this connections were not close. And keep on openning it with each call to parser. I was able to diagonise this using truss command on on solaris. After making many calls, i was error message could not open file Result.xsd (0202). I am using one instance of Parser and Schema. And i am doing clean up for parser after each parse.
    Later i downloaded, 9.2.0.6.0,
    Above problem for the parser was solvedm but still the problem continued for schema validation. And even i tried with latest beta release 10.
    And this has caused great troubles to us. Please can u look whether there is come sort of leakage. Please advice if u have any solution.
    Code---
    This below code is called multiple times
    char* APIParser::execute(const char* xmlInput) {
              char* parseResult = parseDocument(xmlInput);
              //if(strcmp(parseResult,(const char*)"")==0) {
    if(parseResult == NULL) {
                   parseResult = getResult();
    parser.xmlclean();
         return parseResult;
              } else {
                   return parseResult;
    Parser and schema are intialised in Construtor and terminated in Destructor.

    Hi, here is the complete test case
    #include<iostream>
    #ifndef ORAXML_CPP_ORACLE
    # include <oraxml.hpp>
    #endif
    using namespace std;
    #define FAIL { cout << "Failed!\n"; return ; }
    void mytest(int count)
         uword ecode;
         XMLParser parser;
         Document *doc;
         Element root, elem;
         if (ecode = parser.xmlinit())
              cout << "Failed to initialze XML parser, error " << ecode << "\n";
              return ;
         cout << "\nCreating new document...\n";
         if (!(doc = parser.createDocument((oratext *) 0, (oratext *) 0,(DocumentType *) 0)))
         FAIL
         if (!(elem = doc->createElement((oratext *) "ROOT")))
                   FAIL
         string test="Elem";
         for(int i=0;i<count;i++)
              //test="Elem"+string(ltoa(i));
              if (!(elem = doc->createElement((oratext *) "element")))
                   FAIL
              if (!doc->appendChild(elem))
                   FAIL
         //doc ->print();
         //parser.xmlclean();
         parser.xmlterm();
    int main(int argc,char* argv[])
         int count=atol(argv[1]);
         mytest(count);
         char c;
         cout<<"check memory usage n press any key"<<endl;
         cin>>c;
         return 0;
    -------------------------------------------cut here-----
    Now, i cant use the xdk 10g because i work on a hpux machine. I have tried the above program with a count of 1000000. the memory usage at the end was around 2 gigabytes.
    Could someone please please help me? :(
    Thank you.

  • 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

  • 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.

Maybe you are looking for

  • Function module JOB_CLOSE throwing exception

    Hello, We have a batch job which has 2 steps: 1) Step 1 uses job_open, job_submit and job_close and immediately schedules batch job A/P_ACCOUNTS which in turn creates batch input sessions A/P_ACCOUNTS. 2) Step 2 Processes A/P_ACCOUNTS sessions create

  • HT201415 I inserted a working sim card but iPad(2) says "no SIM" - cellular data setting greyed out

    I inserted a working SIM card into my iPad 2. It picked up the network but later gave a message saying "No SIM". The Cellular Data control option is greyed out so I cannot get in to this function. I have tried removing the SIM and re-inserting as wel

  • Stuck in B&W - and YES, I'm in RGB mode

    I hope someone can please help me figure this out. My color picker will only show grayscale. I've tried everything... starting a new file and turning off color management, new doc in both CMYK and RGB. I've changed image modes (and no, it's not in gr

  • Is there a hotkey to send in iMessage from a Bluetooth Keyboard

    I am new to the Community and need to know if there is a way to send an iMessage from an Apple Bluetooth keyboard with out touching the send on iMessage?  If not can I create a hotkey that will do this on the iPad

  • Need advice before buying MBP please!!

    Hi everyone, sorry this is AGAIN a "need help before buying" post. I'm basically looking to buy a MBP for movie production : I will do data transfer (footage into USB3 to TB2 drives/USB3 drives). And maybe some playback of very large 4K video files.