Strange Memory Spike Occurring

Hi all,
I am encountering a weird memory spike running an application under Java 1.4.1_02 and I am wondering if anyone else has encountered it, it knows what the problem might be.
Here's what happens. I am running an application that we develop that (as a simplified explanation) processes requests. Everything ran fine under Java 1.3.1_06 and we are investigating moving it forward to 1.4.1_02. When I start up the system, I run through 4 identical requests as a test. The first three requests go through as expected. On the fourth request, one JVM (there are several JVM's going, communicating through CORBA) starts a vicous memory grab that pushes it's real memory usage from 20MB to 90MB and its virtual memory usage from 30MB to 1.6GB. While this is happening (takes about 2 to 2.5 minutes) everything else in the JVM stops happening (timers don't expire, code isn't executed, etc). After the memory consumption reaches its peak, the system slowly starts recovering the memory, back down to its orignal size (another 2 to 2.5 minutes.) At this point the system resumes operation exactly where it left off and works fine from there on, until it is restarted (I have run up to 10000 requests through afterwards without a problem.)
The memory usage happens in a two step process. It starts with one big jump of about 300MB (total between the real and virtual memory), then continues increasing in a gradual increase. The decrease happens in a mirror of this, with ta gradual decrease for a while, then a big drop at the end. The memory graph would look somehting like this:
                  1.6GB
          330MB/        \330MB
               |        |
               |        |
20MB___________|        |___________ 20MB
               ^        ^
               |        |
          processing  processing
            stops      resumesI have run the process with both -Xrunhprof and -verbose options, and neither show anything that might be the cause of the problem. I then tried attaching to the process with a remote profiler and the problem did not occur. Further playing around with the command line showed that using -server as an option made the problem not occur.
My question is what caused it in the first place? I have concerns about this re-occurring elsewhere, especially if adding the -server option doesn't fix the problem just move it somewhere else.
Can anyone give me any help?

Hi Daman !
Your problem definitely seems to be due to a known bug in jdk1.4.1
- that the heap memory exceeds the allocated ones (default=64mb).
In your case the process stops for some time in your application because the garbage collector is running. Since the GC has to reclaim a large amount of memory it takes some time- thats why the program stops executing.
Use a profiler like JProfiler to confirm if this is due gc activity.
1) Plz try different combination heap sizes
of -Xms and -Xmx setting for eg (-Xms128 -Xmx128) or dont use it at all.
2) But a preferred one will be to upgrade to j2se1.4.1_02.
Hope this helps !!

Similar Messages

  • Strange memory behaviour using the System.Collections.Hashtable in object reference

    Dear all,
    Recently I came across a strange memory behaviour when comparing the system.collections.hashtable versus de scripting.dictionary object and thought to analyse it a bit in depth. First I thought I incorrectly destroyed references to the class and
    child classes but even when properly destroying them (and even implemented a "SafeObject" with deallocate method) I kept seeing strange memory behaviour.
    Hope this will help others when facing strange memory usage BUT I dont have a solution to the problem (yet) suggestions are welcome.
    Setting:
    I have a parent class that stores data in child classes through the use of a dictionary object. I want to store many differenct items in memory and fetching or alteging them must be as efficient as possible using the dictionary ability of retrieving key
    / value pairs. When the child class (which I store in the dictionary as value) contains another dictionary object memory handeling is as expected where all used memory is release upon the objects leaving scope (or destroyed via code). When I use a system.collection.hashtable
    no memory is released at all though apears to have some internal flag that marks it as useable for another system.collection.hashtable object.
    I created a small test snippet of code to test this behaviour with (running excel from the Office Plus 2010 version) The snippet contains a module to instantiate the parent class and child classes that will contain the data. One sub will test the Hash functionality
    and the other sub will test the dictionary functionality.
    Module1
    Option Explicit
    Sub testHash()
    Dim Parent As parent_class
    Dim d_Count As Double
    'Instantiate parent class
    Set Parent = New parent_class
    'Create a child using the hash collection object
    Parent.AddChildHash "TEST_hash"
    Dim d_CycleCount As Double
    d_CycleCount = 50000
    'Add dummy data records to the child container with x amount of data For d_Count = 0 To d_CycleCount
    Parent.ChildContainer("TEST_hash").InsertDataToHash CStr(d_Count), "dummy data"
    Next
    'Killing the parent when it goes out of scope should kill the childs. (Try it out and watch for the termination debug messages)
    'According to documentation and debug messages not really required!
    Set Parent.ChildContainer("TEST_hash") = Nothing
    'According to documentation not really as we are leaving scope but just to be consistent.. kill the parent!
    Set Parent = Nothing
    End Sub
    Sub testDict()
    Dim Parent As parent_class
    Dim d_Count As Double
    'Instantiate parent class
    Set Parent = New parent_class
    'Create a child using the dictionary object
    Parent.AddChildDict "TEST_dict"
    Dim d_CycleCount As Double
    d_CycleCount = 50000
    'Blow up the memory with x amount of records
    Dim s_SheetCycleCount As String
    s_SheetCycleCount = ThisWorkbook.Worksheets("ButtonSheet").Range("K2").Value
    If IsNumeric(s_SheetCycleCount) Then d_CycleCount = CDbl(s_SheetCycleCount)
    'Add dummy data records to the child container
    For d_Count = 0 To d_CycleCount
    Parent.ChildContainer("TEST_dict").InsertDataToDict CStr(d_Count), "dummy data"
    Next
    'Killing the parent when it goes out of scope should kill the childs. (Try it out and watch for the termination debug messages)
    'According to documentation and debug messages not really required!
    Set Parent.ChildContainer("TEST_dict") = Nothing
    'According to documentation not really as we are leaving scope but just to be consistent.. kill the parent!
    Set Parent = Nothing
    End Sub
    parent_class:
    Option Explicit
    Public ChildContainer As Object
    Private Counter As Double
    Private Sub Class_Initialize()
    Debug.Print "Parent initialized"
    Set ChildContainer = CreateObject("Scripting.dictionary")
    End Sub
    Public Sub AddChildHash(ByRef ChildKey As String)
    If Not ChildContainer.Exists(ChildKey) Then
    Dim TmpChild As child_class_hashtable
    Set TmpChild = New child_class_hashtable
    ChildContainer.Add ChildKey, TmpChild
    Counter = Counter + 1
    Set TmpChild = Nothing
    End If
    End Sub
    Public Sub AddChildDict(ByRef ChildKey As String)
    If Not ChildContainer.Exists(ChildKey) Then
    Dim TmpChild As child_class_dict
    Set TmpChild = New child_class_dict
    ChildContainer.Add ChildKey, TmpChild
    Counter = Counter + 1
    Set TmpChild = Nothing
    End If
    End Sub
    Private Sub Class_Terminate()
    Debug.Print "Parent being killed, first kill all childs (if there are any left!) - muahaha"
    Set ChildContainer = Nothing
    Debug.Print "Parent killed"
    End Sub
    child_class_dict
    Option Explicit
    Public MemmoryLeakObject As Object
    Private Sub Class_Initialize()
    Debug.Print "Child using Scripting.Dictionary initialized"
    Set MemmoryLeakObject = CreateObject("Scripting.Dictionary")
    End Sub
    Public Sub InsertDataToDict(ByRef KeyValue As String, ByRef DataValue As String)
    If Not MemmoryLeakObject.Exists(KeyValue) Then MemmoryLeakObject.Add KeyValue, DataValue
    End Sub
    Private Sub Class_Terminate()
    Debug.Print "Child using Scripting.Dictionary terminated"
    Set MemmoryLeakObject = Nothing
    End Sub
    child_class_hash:
    Option Explicit
    Public MemmoryLeakObject As Object
    Private Sub Class_Initialize()
    Debug.Print "Child using System.Collections.Hashtable initialized"
    Set MemmoryLeakObject = CreateObject("System.Collections.Hashtable")
    End Sub
    Public Sub InsertDataToHash(ByRef KeyValue As String, ByRef DataValue As String)
    If Not MemmoryLeakObject.ContainsKey(KeyValue) Then MemmoryLeakObject.Add KeyValue, DataValue
    End Sub
    Private Sub Class_Terminate()
    Debug.Print "Child using System.Collections.Hashtable terminated"
    Set MemmoryLeakObject = Nothing
    End Sub
    Statistics:
    TEST: (Chronologically ordered)
    1.1 Excel starting memory: 25.324 kb approximately
    Max memory usage after hash (500.000 records) 84.352 kb approximately
    Memory released: 0 %
    1.2 max memory usages after 2nd consequtive hash usage 81.616 kb approximately
    "observation:
    - memory is released then reused
    - less max memory consumed"
    1.3 max memory usages after 3rd consequtive hash usage 80.000 kb approximately
    "observation:
    - memory is released then reused
    - less max memory consumed"
    1.4 Running the dictionary procedure after any of the hash runs will start from the already allocated memory
    In this case from 80000 kb to 147000 kb
    Close excel, free up memory and restart excel
    2.1 Excel starting memory: 25.324 kb approximately
    Max memory usage after dict (500.000 records) 90.000 kb approximately
    Memory released: 91,9%
    2.2 Excel starting memory 2nd consequtive dict run: 27.552 kb approximately
    Max memory usage after dict (500.000 records) 90.000 kb approximately
    Memory released: 99,4%
    2.3 Excel starting memory 3rd consequtive dict run: 27.712 kb approximately
    Max memory usage after dict (500.000 records) 90.000 kb approximately
    Memory released:

    Hi Cor,
    Thank you for going through my post and took the time to reply :) Most apreciated. The issue I am facing is that the memory is not reallocated when using mixed object types and is not behaving the same. I not understand that .net versus the older methods
    use memory allocation differently and perhaps using the .net dictionary object (in stead of the scripting.dictionary) may lead to similar behaviour. {Curious to find that out -> put to the to do list of interesting thingies to explore}
    I agree that allocated memory is not a bad thing as the blocks are already assigned to the program and therefore should be reallocated with more performance. However the dictionary object versus hashtable perform almost identical (and sometimes even favor
    the dictionary object)
    The hashtable is clearly the winner when dealing with small sets of data.
    The issue arises when I am using the hash table in conjunction with another type, for example a dictionary, I see that the dictionary object's memory is stacked on top of the claimed memory space of the hashtable. It appears that .net memory allocation and
    reuse is for .net references only. :) (Or so it seems)
    In another example I got with the similar setup, I see that the total used memory is never released or reclaimed and leakage of around 20% allocated memory remains to eventually crash the system with the out of memory message. (This is when another class
    calls the parent class that instantiates the child class but thats not the point of the question at hand)
    This leakage drove me to investigate and create the example of this post in the first place. For the solution with the class -> parent class -> child class memory leak I switched all to dictionaries and no leakage occurs anymore but nevertheless thought
    it may be good to share / ask if anyone else knows more :D (Never to old to learn something new)

  • ITunes memory spikes and constant crashes

    getting nowhere with Apple support so I'm hoping someone here can help.  iTunes has become unusable for me.  It crashes within a minute if I do nothing, and even faster if I try to sync a device, download a podcast etc.  Looking at the activity monitor I can see the memory spike to 100% when the crash occurs, but I have no idea how to fix it.  I've reinstalled itunes, trashed the prefs and cache etc but nothing seems to help.  The problems started after I activated the awful iTunes Match.  I've completely deactivated that now and removed all my devices from iTunes match but I wouldn't be surprised if was related to this problem somehow. I've begged Apple to delete all my match data from the server as others reported this fixing problems, but their response was a link to the iTunes Match promo page.
    I've made a short vid that shows the crash.
    http://www.onlinegalleries.com.au/itunes-crash/itunes-crash.mov
    In the video, the second the download starts, itunes has crashed.
    Any help would be appreciated.
    Thanks

    Hi Ian,
    Thanks for the reply. I just checked and the computer is actually USB 2.0 and not 1.1. I also uninstalled iTunes and all of its components, restarted, reinstalled iTunes, restarted, plugged in my iPod Touch, and I'm still experiencing this problem. The iPod Touch still displays "sync in progress" while the memory spikes. (Frankly, I have no idea what information is being synced between the iPod and the computer.)
    The reason this baffles me is because I also own an older iPod video and would play it through iTunes on my computer at work for several hours each day and I never once encountered this issue. I do know that the iPod video is HD based and the iPod Touch uses flash memory. Would this make a difference? If it did, why wouldn't I experience a similar problem on my MacBook Pro when playing my iPod Touch through iTunes?
    **I should clarify that after further examination, the memory does spike, but it's the CPU Usage that shoots through the roof and holds at 100% for ten to fifteen seconds. The computer has a Pentium 4 processor running at 2.53GHz.
    Message was edited by: ali_baba7

  • Bug in my code or strange memory behavior ?

    Hi, Guys !
    It's been a while since I post something in this forum - trying to use your help when it's really needed.
    So, here we go ...
    (we use Oracle 8.1.7 on Unix box and SQL * Plus 8.1.6)
    While back I wrote "core" PL/SQL package that resides in let's say DB1 database. It has RECORD_EXISTS_FNC function designed to dynamically check If the record exists in certain table/view. Assumptions are that you pass in :
    Table/View name, Column name, and unique numeric value (because by DBA rules all of our Tables have SEQUENCE as a Primary Key. And I plan soon to put in overloaded function to accept unique character value)
    Also every Table has SYS_TIME_STAMP and SYS_UPDATE_SEQuence columns that populated by Trigger before Insert/Update representing Last Update time_stamp
    and how many times record was updated within same second.
    (in case more than one User updates same record in same time - that was written before Oracle had more granular date/time). So function has SYS_TIME_STAMP and SYS_UPDATE_SEQUENCE parameters (optional) accordingly.
    And It looks something like :
    FUNCTION RECORD_EXISTS_FNC
    (iBV_NAME IN USER_VIEWS.VIEW_NAME%TYPE,
    iPK_FIELD IN USER_TAB_COLUMNS.COLUMN_NAME%TYPE,
    iPK_VALUE IN NUMBER,
    iSYS_TIME_STAMP IN DATE DEFAULT NULL,
    iSYS_UPDATE_SEQ IN NUMBER DEFAULT NULL) RETURN BOOLEAN IS
    TYPE REF_CUR IS REF CURSOR;
    CR REF_CUR;
    i PLS_INTEGER DEFAULT 0;
    vRESULT BOOLEAN DEFAULT FALSE;
    vQUERY USER_SOURCE.TEXT%TYPE;
    BEGIN
    vQUERY := 'SELECT 1 FROM ' || iBV_NAME || ' WHERE ' || iPK_FIELD || ' = ' || iPK_VALUE;
    IF iSYS_TIME_STAMP IS NOT NULL AND iSYS_UPDATE_SEQ IS NOT NULL THEN
    vQUERY := vQUERY || ' AND SYS_TIME_STAMP = TO_DATE (''' || iSYS_TIME_STAMP || ''')
    AND SYS_UPDATE_SEQ = ' || iSYS_UPDATE_SEQ;
    END IF;
    IF iBV_NAME IS NOT NULL AND
    iPK_FIELD IS NOT NULL AND
    iPK_VALUE IS NOT NULL THEN
    OPEN CR FOR vQUERY;
    FETCH CR INTO i;
    vRESULT := CR%FOUND;
    CLOSE CR;
    END IF;
    RETURN vRESULT;
    EXCEPTION
    WHEN OTHERS THEN
    IF CR%ISOPEN THEN
    CLOSE CR;
    END IF;
    INSERT_ERROR_LOG_PRC ('CORE_PKG', 'ORACLE', SQLCODE, SQLERRM, 'RECORD_EXISTS_FNC');
    RETURN vRESULT;
    END RECORD_EXISTS_FNC;
    So the problem is when I call this function from let's say
    database DB2 (via db remote link and synonym) and I know exactly that record does exists (because I am selecting those SYS fields before pass them in) - I get the correct result TRUE. The other programmer (Patrick) calls this function within same DB2 database, within same UserID/password (obviously different session), running exactly the same testing code and gets result FALSE (record doesn't exist, but it does !) He tried to Logoff/Login again several times within several days and try to run it and still was getting FALSE !
    I tried to Logoff/Login again and I was getting mostly TRUE and sometimes FALSE too !!!
    I thought may be It has something to do with REF CURSOR that I use to build SQL on the fly, so I changed to NDS
    using EXECUTE IMMEDIATE statement - nothing changed.
    vQUERY := 'SELECT COUNT (1) FROM ' || iBV_NAME || ' WHERE ' || iPK_FIELD || ' = ' || iPK_VALUE;
    IF iSYS_TIME_STAMP IS NOT NULL AND iSYS_UPDATE_SEQ IS NOT NULL THEN
    vQUERY := vQUERY || ' AND SYS_TIME_STAMP = TO_DATE (''' || iSYS_TIME_STAMP || ''') AND SYS_UPDATE_SEQ = ' || iSYS_UPDATE_SEQ;
    END IF;
    EXECUTE IMMEDIATE vQUERY INTO i;
    vRESULT := NOT (i = 0);
    RETURN vRESULT;
    Interesting note : when Patrick doesn't pass SYS parameters (Time_stamp, Update_sequence), or passes NULLs - function always finds the record ! (Statement 2 below)
    May be it has to do with the way TO_DATE () function gets parsed in that dynamic SQL - I don't know ...
    Here's the test code :
    SET SERVEROUTPUT ON;
    DECLARE
    SYS_TIME DATE;
    SYS_SEQ NUMBER;
    bEXISTS BOOLEAN DEFAULT FALSE;
    BEGIN
    SELECT SYS_TIME_STAMP, SYS_UPDATE_SEQ INTO SYS_TIME, SYS_SEQ FROM LOCATION_BV WHERE PK = 1;
    bEXISTS := CORE_PKG.RECORD_EXISTS_FNC ('LOCATION_BV','PK',1, SYS_TIME, SYS_SEQ); -- STATEMENT 1
    --bEXISTS := CORE_PKG.RECORD_EXISTS_FNC ('LOCATION_BV','PK',1, NULL, NULL);        -- STATEMENT 2
    IF bEXISTS THEN
    DBMS_OUTPUT.PUT_LINE ('TRUE');
    ELSE
    DBMS_OUTPUT.PUT_LINE ('FALSE');
    END IF;
    END;
    I asked our DBA, he has no clue about this strange inconsistent results.
    I debugged line by line, extracted that generated SQL and ran it in same account - works fine !
    Does anyone knows or have clues or can help what's going on ???
    I don't know If this is bug in my code or strange memory behavior ?
    (Please let me know If anything unclear)
    Thanx a lot for your help and time !
    Steve K.

    see your other thread
    Bug in my code or strange memory behavior ?

  • Is there any way to avoid a huge memory spike when using CGContextDrawImage for a high resolution image?

    Hi,
    I'm trying to fix the orientation of an UIImage in my app (iPad 2, iOS 7). I'm using the method described here: https://gist.github.com/alex-cellcity/1531596, but a huge memory spike appears when CGContextDrawImage is called. The image size I'm trying to fix is 2848x4288.
    Anybody knows any algorithm to avoid this huge spike?
    Thanks,
    Roberto.

    While I never done iOS code it appears that the code you link to basically does the following:
    takes a large image A
    generates a transformation matrix by doing rotation in 90 degree increments and by mirroring
    creates a large image B
    draws image A into B using the transformation matrix
    releases memory for image A
    goes on using image B
    This results in a memory peak as you have two large images in RAM, until image A gets deallocated, which can't be done until B has been drawn.
    I can see two possible solutions to this, both which probably require you to explicitly modify individual pixels:
    1) Try to simplify the solution - if 180 degree rotation and mirroring is enough to solve your image issues, then a simple in-place (same bitmap) pixel swap could be done.
    2) Find more memory -  if you need 90, 270 or arbitrary degrees of rotation as well, you could instead keep either image A or B on disc.
    Keep image A on disc: read pixels from disc and place appropriately in image B. This may require you to first load image A and write it back to disc as ARGB data (one byte for each color) for easy access.
    Keep image B on disc: get pixel from image A and place it at the right location in image (file) B - this will require pre-creating a file of the correct size for Bs ARGB data and then moving the insertion point for writing around. When done dealloc image A and load image B.
    Keep image A and B on disc: combine using disc for image A and B - this will minimize RAM usage but will probably be the slowest solution and will increases disc (SSD/flash) load and wear.

  • IOS - Strange memory leak using ABPeoplePickerNavigationController

    Hi there!.
    I 've read other posts regarding this problem but I wasn't capable of guessing what's going on with this memory leak.
    To keep it simple, let's say I have an IBAction which triggers once the user has pressed a button. The code is as follows:
    - (IBAction) showBorrowersPicker:(id)sender{
    ABPeoplePickerNavigationController *picker =
    [[ABPeoplePickerNavigationController alloc] init];
    picker.peoplePickerDelegate = self;
    [self presentModalViewController:picker animated:YES];
    [picker release];
    The code works fine but it leaks a small quantity of memory and I can't understand why. I think it's a problem with the ABPeoplePickerNavigationController because if I comment the line "self presentModalViewController.picker animated:YES" it obviously doesn't present the modal view with the AB's contacts but the app continues leaking memory.
    I've read it might be a reported bug but the post where I've read it is from 2009 or so. I don't know if the bug persists of, more likely, I'm doing something wrong but I don't know what. I'm releasing the picker instance so I don't know why is it leaking memory.
    Running Instruments I get the following info:
    Leaked Object: ABStyleProvider
    Address: 0x19f810
    Size: 16 Bytes
    Responsible Library: AddressBookUI
    Responsible Frame: +[ABStyleProvider
    Any help would be much appreciated!

    Hi George,
    thank you very much!. I've tried it and seems to work perfectly. No memory leaks at all!. A couple of weeks ago I was working with Apple's QuickContacts source code and it had the same problem with this strange memory leak so I think it's really weird since I can't believe that Apple's engineers would commit such an error... but who knows!
    Thank you very much for your help! :-D

  • Out of memory error occurred while processing message at RFC receiver

    Hi Experts
    Hi Experts
    i have a scenario file to RFC BPM bridge Sync/Async,
    i´m getting this error when this BPM is trying to read  the RFC
    com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: Out of memory error occurred while processing message at RFC receiver
    please somebody can you help me

    Hi,
    No need to restart the server. In PI there is a parameter 'java Heap' indicating the size of data processed adapters. Check if it is necessary to increase the size of this parameter.
    Check the note: 1173398
    I hope to help you
    Regards,

  • How can memory leaks occur?

    Hi,
    I was just wondering how a memory leak can occur in Java. The garbage collector is supposed to free up all unused variables, so under what circumstances can it happen?

    This is not technically a "memory leak". I've seen
    this called "loitering objects", which conjures upa
    vivid picture: objects hanging around with nothingto
    do...I think it's the classic java memory leak. A bug in
    a program that prevents the freeing up of memory that
    it no longer needs.Yes, but it's not what is traditionally termed a memory leak.
    A real memory leak is memory that's claimed by the program but no longer accessible to the program for freeing up.
    That can in Java (where what we call a program isn't a complete program but runs inside a virtual machine which handles memory allocation and deallocation) only happen if there's a flaw in the JVM itself which causes errors in memory deallocation (so most likely a flaw in the garbage collector).
    In Java the objects you create are always out there somewhere where something can reach them so as to prevent them from being available to the garbage collector.
    Different cause, same effect in that in both cases memory isn't getting freed for reuse.

  • [SOLVED] Strange memory leak

    After updating to systemd (maybe after it) strange things with memory:
    In one moment count of free memory precipitously start decrease, in 10 seconds in decrease to 0, after it same happen
    to swap.
    http://i.imgur.com/ANqbn.png
    In that screenshot you can see, that top-memory process (luakit) owns only 10% (200mb). I can't say who owns all memory, but this is not one process. Next time I try to get ps all -A output, but its a bit difficult - system hung-up very fast.
    Journal log:
    https://www.dropbox.com/sh/oq5yk03tzyfj … _crash.log
    Watch from start to --Reboot-- line.
    My systemd services:
    cronie, dhcpcd@eth0, netcfg, remote-fs, wicd.
    Packages status:
    http://pastebin.com/RRsy0tDw
    Used apps:
    In one time: luakit, vim, mocp, weechat
    Another one: mplayer
    Last edited by ShadowPrince (2012-12-15 04:49:07)

    Ahahahahahahahahah.
    I finnaly got ps -Af output and found there many copies of one script, who runs itself recursively.
    That script was binded to cron.hourly, and after hour of work start to multiply.
    Yeah, script was mine, I think in one update (when I practice in VIM) I put here that code accidentally.
    Anyway, that was fun. Linux rule.

  • Memory leak occurs in dbc::get

    I found memory leak with using dbc::get in order to retrieve the record.
    I don't know how to free memory after cursor.
    I have expected that "cursor->get(with DB_NEXT flag) allocated memory and cursor->close made memory be free.However, memory was not free when cursor was closed.
    Also, I checked that the memory was free when db was closed ( db->close )
    Could you tell me why this problem occurs and how to deallocate the memory?
    My partial code is below
    =======================================================================================================
    DBC *pTimeCursor;
    // initialize cursor
    m_pDbTime->cursor( m_pDbTime, NULL, &pTimeCursor, 0 );
    DBT key, dataTime, dataData;
    memset(&key, 0, sizeof(key));
    memset(&dataTime, 0, sizeof(dataTime));
    while( pTimeCursor->get(pTimeCursor, &key, &dataTime, DB_NEXT) == 0 )
           recnoNow = *((unsigned long *)key.data);
           timeNow = *((unsigned long *)dataTime.data);
           if( timeNow >= *pTime )
                bFind = true;
                break;
    =======================================================================================================

    Within BDB there are  objects that are created dynamically and reused.   Those objects are released upon db close.     This is normal behavior.
    This sentence meas that it is normal behavior that BDB make allocated memory increasing by using the get function. Is it right?
    I checked that all memory allocated was return upon db close. Unfortunately, I cannot close db in the middle of program because I should access db very often. For this reason, My program do open and close only once.
    Memory keeps increasing, and overflows at last.
    How can I release memory allocated without db close?

  • Strange memory error during import

    I am on Oracle 10.2.0.3 on HP UNXI 11. When doing import after all tables have been imported,
    I get following emmory errors. I have seen it in 2 different database instances. No clue, why this error
    Occurs.
    sh: 3127 Memory fault
    sh: 3300 Memory fault
    sh: 3441 Memory fault
    sh: 3471 Memory fault
    sh: 3528 Memory fault
    sh: 3531 Memory fault
    sh: 3535 Memory fault

    sh: <number> signifies it is an error message from the shell , with line number attached.
    So this is not an Oracle error, but an O/S error.
    As we don't see your script, nor your ulimit settings, help is a little bit difficult.
    Sybrand Bakker
    Senior Oracle DBA

  • Satellite Pro 4600: Strange memory issue - memory seems to

    Hi all,
    for the second time within 18 months I am experiencing strange problems with the memory boards (2x 256 MB of 144 So-Dimm PC133) of my sat pro 4600: from one day to the other the memory seem to "burned out" like old electric bulbs. Prior to that I used the sat pro 4600 for several hours and the surface over the memory-boards got very hot.
    Is there anybody out there who faced the same problems? Concerning replacement: Should I better go for PC100 Chips instead PC133?
    Thanks in advance : Bernie

    Right! One of the two 256 MB memory modules with which the sat pro 4600 was delivered was a PA3069U-1M25 - it died along with the other one after seven month of use. The other 256 MB Module's sticker reads: "TOSHIBA - THLY 25N01B75 PC 133S-333-542B1". These two modules were replaced 9 months ago with a new MDT 256MB PC133 and a used 64MB noname PC100. The MDT is dead since monday while the used "ebay-trash" runs perfectly well.Are you sure the memory speed is the keypoint to observe in terms of temperature?

  • Really strange Memory Behavior in Photoshop CS6

    I have:
    MacPro 1,1
    32GB RAM
    SSD system disc
    separate SSD scratch volume
    recently installed OS-X 10.8.5
    freshly re-installed and updated PS CS6
    PS is configured to use 20GB memory.
    I have created this huge psb-file with 53GB (big because it's a stitched pano with several layers, 16bit).
    Opening this file again is a nightmare and sometimes fails completely.
    When PS starts opening the file, PS takes a long while reading data, using something like 15-20GB RAM and starts to write to the scratch disc, as one would suspect.
    Then something bizarre happens.
    The checkerboarded window is drawn on screen, but before any real pixel of the picture is displayed, PS fills all available RAM (even though it shouldn't use more than 20B):
    Then the Mac starts to build up a swap file which keeps growing and growing on the system disk up to 56GB.
    This process takes around 20 minutes while PS is "Not responding".
    The console log starts recording HI_WAT_ALERTS and swapon-messages.
    If I'm lucky, the whole thing deflates suddenly at some point drawing the pictures and releasing all that RAM.
    If I'm not that lucky, PS is suspended with a message "Your startup disk has no more space available for application memory".
    Even if there still seems to be space left on that volume.
    I maxed out on RAM and even got a larger startup disk to prevent it from filling up with swap completely.
    But this doesn't seem to help.
    I originally started having this situation with OS 10.7.5.
    But a migration to 10.8.5 and a re-install of Adobe CS didn't help either.
    Adobe vehemently denies any memory leaks in PS.
    Enabling/Disabling GPU display support doesn't change anything.
    Does anybody have any ideas what's going on?
    Thanks

    Lowering the memory for PS doesn't help.
    I tried 16GB and 12GB.
    Even when limiting PS to 8GB, the situation remains:
    While the file is being read, PS grows to 8GB, but "inactive RAM" starts to fill memory until "Free RAM" ist virtually zero.
    Then, when the image is about to be actually drawn, PS balloons to 29GB, and OS-X starts to build the huge swap-file:
    The startup disk gets real busy paging in and out simulataneously until the swap has grown to about 50 GB.
    This takes about 30 minutes, while PS is "not responding".
    Then, the pictures appears on the screen, the whole memory thing deflates like a soufflee.
    PS goes back to using 8GB of RAM, swap is zero and tons of RAM are free.
    GPU accelleration was disabled (don't know how this translates to OpenGL usage).
    And my Mac Pro is a 2,1 (mistyped 1,1 in the original post).

  • Out of memory error occurred

    Hello
    Why does this error occur? Typically when opening ir saving a report to database
    "OutOfMemory error occurred"
    Discoverer Plus 10g, IE 7, WinXP SP3.
    Regards
    Ariv

    See Note 414786.1

  • Strange Memory Leak

    Our application monitor (Panorama) is showing that our recently deployed ActiveMQ seems to be consuming a lot of memory. We allocated 512MB to the JVM. Within 2 hours it eats all that up and each full GC only frees up about 20% of memory. Over time this gradually decreases.
    verbose:gc shows that the heap is less than 100MB and the permgen is only about 50MB. E.g.
    10177.573: [Full GC [PSYoungGen: 370K->0K(4480K)] [PSOldGen: 58372K->40910K(55360K)] 58743K->40910K(59840K) [PSPermGen: 29417K->29417K(49728K)]
    This doesn't change much over time.
    We thought there might be a classloader leak, but verbose:class shows that most of the classes are loaded in the first minute and very little memory has been consumed by then.
    This seems to leave hundreds of MBs unaccounted for. Where can this be and how to we look for it?
    -- Frank

    Hi 835631,
    Can you please provide the following:
    - JDK vendor and version
    - Your JVM start-up arguments e.g. -Xms, -Xmx and more
    - 1 verbose GC snapshot right after server restart
    - 1 verbose GC snapshot when the memory is running low
    It will also help to get a JVM Heap Dump generated. This will provide you with clear view on the your new application Java Heap footprint post MQ implementation.
    Keep in mind that messaging system like MQ or pure JMS messaging via MDB can use a lot of Java Heap depending on the tuning settings , # of bean in the pool, # of messages etc.
    Regards,
    P-H
    http://javaeesupportpatterns.blogspot.com/
    Edited by: PHCharbonneau on 10-Feb-2011 11:54 AM

Maybe you are looking for

  • Standard File adapter Query !!

    HI Guys, Does standard File adapter has got ability to pick a file  based on required file name. Ex: If we have 30 files in one folder, 6 file name are like xml_666778_001.xml, xml_666778_002.xml,xml_666779_001.xml, xml_666778_003.xml, xml_666779_002

  • Editing 5.1 Using SPDIF

    I am using a sound card from my computer that outputs over my digital SPDIF connection directly to a receiver that decodes Dolkby, PCM, etc... If I am watchign a movie or listening to audio that is encoding, I have no problem with surround sound. I w

  • Insert into table returning primary key (auto number) in resultset

    Hi, I'm connecting to Oracle 10g via JDBC (ojdbc14.jar). My SQL statement is as follows: INSERT into Student (studentName, phone, email, address) values ('Jason', '12345678', 'test', 'test'); SELECT Student_studentId_SEQ.NEXTVAL FROM DUAL; Fyi -The S

  • In support forum, signed in,where do I link to questions I've asked? Years back, could get RSS feed for question. Still available?

    Where can I link to my questions from my account? Searching for username gives no results. Some years back, you could subscribe to an RSS feed for a question, yours or others. Is that gone, if so, why? How do you save the question, without saving the

  • Crashes with OS X update 10.5.7

    iPhoto 6.0.6 crashes when attempting to open any Film Roll. No problems before update. Any suggestions (other than new version, I'm out of the country). iPhoto library is on iDisk. Also iDVD crashes upon opening. Thanks.