Free memory after Function call

Hi,
Is there a possibility to free the memory after a call to a function.
The call is only used for display, not to get data.
(For example - CALL FUNCTION 'FKK_BUPA_DISPLAY')
Our z-transaction delivers a way of navigating through different ISU objects (coming from an ALV list)
The user first selects a case from this list and then he receives the details. From the details screen we then call these standard function to display the ISU objects.
During the day memory usage is getting build up and it's only released when the user leaves our z-transaction.
Ideally the memory should be released when the user returns to the list and not at the end of the day when he leaves the transaction.
I've tried with FREE MEMORY but this doesn't help.
Greetings,
Ivo

Hi Ivo,
sounds like a "enldess transaction" pattern.
Take multiple memory snapshots (OK-CODE /HMUSA) in your application and compare
these in transaction S_MEMORY_INSPECTOR in order to find out if there is a memory
leak. The comparison will show you where memory growth comes from... maybe this gives
you an idea what could be deleted between the steps of your endless transaction.
Kind regards,
Hermann

Similar Messages

  • Free memory after using GetRS232ErrorString() to avoid memory leak?

    Hello,
    Is it necessary to free memory after using function GetRS232ErrorString() to avoid memory leak?
    Example 1:
    int main();
    char *strError=NULL;
    strError = GetRS232ErrorString(55); /* just an example for error message */
    free(strError ); /* Do I need to free this pointer? */
    Example 2:
    int main();
    MessagePopup ("Error", GetRS232ErrorString(55)); ; /* Will I get a memory leak with this function call? */
    BR
    Frank

    It's a pity that the documentation is indeed so poor in this case, but testing shows that it always returns the same pointer, no matter the error code, so it seems to be using an internal buffer and you are not supposed to free the string (but need to copy it before the next call to GetRS232ErrorString if you need to keep the text). It does however return a different pointer for every thread, so atl least it seems to be thread safe.
    Cheers, Marcel 

  • Free memory after TDMS logging

    Hi, how can I free memory after reading TDMS files. I haev a very big TDMS file that contains 17000000 digital samples, after reading the data and graphing it I would like to delete it from memory because it is no longer needed. I have noticed I should close LabVIEW to free that space. Is there any way to free that memory after reading and plotting?
    Thanks

    LabVIEW wil take care of the memory management. Thus, there is no explicit way for you to free memory in LabVIEW. In fact, I don't think you should do that by yourself. LabVIEW has quite good memory optimation strategy and it wll track all the memory usage in your VI and reuse/free memory when there is no reference to it. As for TDMS, once the data is read out from the TDMS VIs, there will be no additional data copy inside.

  • IOS 5: iPod Touch 4g says no Free memory After Sync

    My iPod 4g, iOS 5, 8GB says After Sync no Free memory. Before the Sync there was 1gb Free Memory.... Even if i Delete Apps, the iPod says 0 Byte Free memory...

    It was in the category "Other". Now i Have done a Hard reset(i think): i have pressed the Lock Button 5sec, then Lock and home Button 10 sec together. Then it Took a few minutes. In this minutes there was the Apple Logo , Like when the iPod Starts up. After that, everything was okay and i had  again 1gb Free memory :)

  • Replication agent doesn´t free memory after expensive operation

    Our environment is made up of master node and 17 subscriber.
    We have issued a delete action implying 1000000 rows. During the deletion, normal CPU, memory and swap usage was observed. Later, CPU usage has recovered while memory and swap has not. The most memory consumming process was timestenrep with 9Gb.
    Deletion has been correctly replicated to all nodes. However, the replication agent needed to be restarted manually in order to recover memory/swap.
    Why the replication agent did not recover on its own and free memory?
    Definition in sys.odbc.ini
    Datastore=/data/db/xxxx
    PermSize=4000
    tempSize=250
    DurableCommits=0
    TypeMode=1
    LogFileSize=64
    LogBuffSize=65536
    MemoryLock=3
    LockWait=10
    PrivateCommands=1
    Authenticate=0
    DatabaseCharacterSet=WE8ISO8859P15
    ConnectionCharacterSet=WE8ISO8859P15
    CkptFrequency=300
    CkptLogVolume=128
    Connections=90
    TimesTen Version installed (ttVersion command)
    TimesTen Release 7.0.5.0.0 (64 bit Solaris) (ivpnges2tt70:17000) 2008-04-04T01:19:41Z
    Instance admin: root
    Instance home directory: /opt/TimesTen/ivpnges2tt70
    Daemon home directory: /var/TimesTen/ivpnges2tt70
    Regards,
    Matú

    In a replicated environment, executing very large transactions (such as deleting 1M rows in a single transaction) is a very hazardous thing to do and is something you should avoid at all costs. It can cause a number of serious problems. Transactions should be limited to no more than a few thousand operations. If you need to empty a table, use TRUNCATE instead. This will execute far more quickly, generate less log and will not cause problems for replication. If you cannot use TRUNCATE then you should break the DELETE up into multiple smaller transactions. For example if you wish to delete all row where 'startdate' is less than some value and this is likely to result in a large number of deletions then you could repeatedly execute the following sequence:
    DELETE FIRST 1000 FROM sometable WHERE startdate < :someval;
    COMMIT;
    and just keep doing this until the 'rows affected' value is zero.
    The same applies to large inserts and updates.
    The memory usage behaviour of the replication daemon, while perhaps not ideal, is correct and as expected. When you delete 1M rows in a single transaction the replication daemon has to allocate memory (via malloc) for 17x copies (in your case) of the transaction data. That is probably a lot of memory. Once the transaction has been replicated to all 17 subscribers. This memory is moved to an internal 'free' list for re-use but is not returned to the O/S until the replication agent is terminated. Since it such a bad idea to execute these large transactions this behaviour is generally not a problem.
    Chris

  • Suppressing status bar message after function call?

    Hi,
    I'm calling a few functions in a program.
    After calling them, for example function "L_TO_CREATE_DN", I get a message in the status bar, in this case saying that a TO has been created successfully.
    How can I suppress all status bar messages for all the functions that are being called in the program?
    THX!

    Hi
    Try to use the default excption error_message
    CALL FUNCTION
    EXCEPTIONS
        error_message = 1
        OTHERS        = 2.
    Max

  • Modification in data before commit and after function call

    Hi,
    I am creating a Transfer order (TO) from Transfer requirement using function module L_TO_CREATE_TR.
    For one of my requirement I am
    Passing I_UPDATE_TASK = ‘X’ and I_COMMIT_WORK = <blank> so that the actual creation happens on the next screen. Next screen will show some details which can only be fetched if L_TO_CREATE_TR is issued.
    Now, on second screen user may change one field called quanity. How can i acheive this.
    I can think of two options here :
    1) Call rollback and then call the FM again this time with commin flag ON
    2)  Do we have second option here.
    Let there be a light

    thanks . i have an idea.
    first ,create a row ,and then insert this row.

  • IPad 2 fills up its 4GBs Free Memory After Switching On

    Hi Forum
    odd one. My Ipad2 is always full. except when i turn it off, and on, it reveals 4.2GBs free. This then, while its on and left on for days , seems ot fill up, and when i come to add something to it, or use it, its full. That free 4.2Gbs has been filled. i havent used it, addded to it, downloaded to it, uploaded to theicloudaccojt connected to it...?!?!?!
    why does it fill up?
    and nothing in 'usage' shows anything too large either?!?!?!

    Does the 4.2GB free space you refer to come from Settings>General>About>Available?
    How much space is used by your Other? You may be able to reduce.
    How Do I Get Rid Of The “Other” Data Stored On My iPad Or iPhone?
    http://tinyurl.com/85w6xwn
    How to Remove “Other” Data from iPhone, iPad and iPod Touch
    http://www.igeeksblog.com/how-to-remove-other-data-from-iphone/
    With an iOS device, the “Other” space in iTunes is used to store things like documents, settings, caches, and a few other important items. If you sync lots of documents to apps like GoodReader, DropCopy, or anything else that reads external files, your storage use can skyrocket. With iOS 5/6/7, you can see exactly which applications are taking up the most space. Just head to Settings > General > Usage, and tap the button labeled Show All Apps. The storage section will show you the app and how much storage space it is taking up. Tap on the app name to get a description of the additional storage space being used by the app’s documents and data. You can remove the storage-hogging application and all of its data directly from this screen, or manually remove the data by opening the app. Some applications, especially those designed by Apple, will allow you to remove stored data by swiping from left to right on the item to reveal a Delete button.
    What is “Other” and What Can I Do About It?
    https://discussions.apple.com/docs/DOC-5142
    iPhone or iPad Ran Out of Storage Space? Here’s How to Make Space Available Quickly
    http://osxdaily.com/2012/06/02/iphone-ipad-ran-out-of-available-storage-space-ho w-to-fix-quick/
    6 Tips to Free Up Tons of Storage Space on iPad, iPhone, and iPod Touch
    http://osxdaily.com/2012/04/24/6-tips-free-up-storage-space-ipad-iphone-ipod-tou ch/
    Also,
    How to Clear Message/iMessage Cache on iPhone & iPad And Reclaim Lots of Free Space
    http://www.igeeksblog.com/how-to-clear-message-imessage-cache-on-iphone-ipad/
    What is Stored in iCloud and What is Not
    https://sites.google.com/site/appleclubfhs/support/advice-and-articles/what-is-s tored-in-icloud
     Cheers, Tom

  • Function Call problem {Urgent Please}

    Dear All,
    I am calling a function (which is in PLSQL library) from a procedure in which is alos in same PLSQL library, and calling this procedure from my form,
    everthing in a procedure working well but this function call is not working, but when i put some Message before and after function call its woking fine for example.
    in follwoing case is working
    Beging
    Message('start calling') ;
    x := My_Function(abc) ;
    Message('end calling') ;
    End ;
    in follwoing case its not working
    Begin
    x := My_Function(abc) ;
    end ;
    Can anyone tell me whats wrong with this ???
    Thanks in Advance.
    Regards,
    Zahid Raj
    Message was edited by:
    zahidraj

    looks strange to me!
    I think better try recompiling the Library and then again attach to the form.

  • HP Laserjet p1102w - after firmware upgrade / Smart Install update - down to 1MB free memory

    Hello,
    I have a Laserjet p1102w running off a laptop with Windows 7 64-bit. Just bought the printer this month.
    After updating the firmware to 20120814 version and updating the SmartInstall update utility for the 20120814 version as well, I am now down to 1 MB free memory (out of 8MB originally). [Another LJ p1102w updated prior to these updates has 3MB free memory.]
    Because I have 1MB free memory, the printer is almost a brick. It can print simple text based pages - however, printing any page with a graphic or a PDF file will cause the printer to take forever to receive data - essentially preventing printing a page on  my new printer (while printing the same page instantaneously on my older nonupdated p1102w).
    Is there any way to fix this problem, given there is no memory upgrade option? Otherwise, this printer is a brick.
    Thank you in advance for a reply - especially from HP.

    Hi cyskim,
    Did you tried turning the printer off and on after updating the firmware? This should clear its memory, including any memory may affected during the firmware upgrade proccess .
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • After a function call values in the system sy-msgty.........

    After a function call values in the system sy-msgty,sy-msgit and sy-msgno are getting empty. And the program dumped suddenly with showing a message_type_unknown message.
    Here i wanted to know y these values are becoming empty
    Pls help me out here

    The first Idoc has two line items and the second idoc has 7 line items. As the split is per 5 line item- the target has 3 Idocs.
    Now the problem is that the header value in the target: REF_DOC_NO has to be created as per the number of line items and doesnt come from header record directly.

  • I found several charges on my bank account from Apple on App that is completely free. After calling the number showing on my bank statement there an automated answering that tells you to go to apple website!!! There is nobody to talk to!! Complete rip OFF

    I found several charges on my bank account from Apple on App that is completely free. After calling the number showing on my bank statement there an automated answering that tells you to go to apple website!!! There is nobody to talk to!! Complete rip OFF
    And now because I want to communicate with apple support I have to go through the hectic website and community support, this is ridiculous.
    I have 5 iPhones in my account and this makes me reconsider upgrading to iPhones again.
    Why Apple put a phone number in the bank transaction, if there is nobody to talk to!!!!!!
    I hope someone from Apple support can answer my question.

    Go to getsupport.apple.com.  Or, call 1-800-MYAPPLE.
    Just because an app is free to download doesn't mean that there aren't in-app purchases available.
    Go to iTunes on your computer, log into the iTunes Store with your Apple ID & password, and check your purchase history.  Be advised that all iTunes & App Store purchases are final.

  • Sony Xperia E C1504 - Low Phone memory - only 54 MB free Memory on phone after update

    I am using Sony Xperia E c1504 phone and facing memory problem. The downloaded applications are already moved to SD card and some of the inbuilt applications on phone are also moved on SD Card. Now there is no application which I can move on SD card by the simple way given in phone. Also I regularly cleans the cache by cleaner. All my photos are saved to SD card, no videos are taken so no problem of video memory. I have moved every possible element on SD card.
    In this condition when I downloaded the new update of phone, it installed some more new applications like Google books, google movies, google games, google magazines etc. on my phone which have no option to move to SD Card. So my phone memory is very low. I uninstalled one inbuilt application Cricbuzz but still my phone is showing only 54 MB free phone memory. Now I can't update some applications due to low space on phone though I have 1.79 GB on internal storage free and 14.73 GB on SD card free memory.
    Now how to manage these applications? Is there any way so that I can move some more inbuilt applications to SD card?
    And what is rooting? please explain. Can I move applications on phone to SD card by rooting? If yes how?
    Is there any other way to solve this problem?
    I am new to android technology. Please help.

    http://forum.xda-developers.com/xperia-j-e/general/how-to-root-sony-xperia-e-c1504-c1505-t2683278
    "I'd rather be hated for who I am, than loved for who I am not." Kurt Cobain (1967-1994)

  • Excel remains in memory after using by DOI.

    Hi.
    I'm trying to use DOI but
    Excel instance remains in memory after I have run macro and leave program. If I don't run any macro - everything is Ok.
    I run macro by this way:
        CALL METHOD document->execute_macro
          EXPORTING
            macro_string = 'MyMacro'
            param_count  = 0
          IMPORTING
            error      = error.
    Before leaving the program I release DOI objects as in demo
        IF NOT documentproxy IS INITIAL.
          CALL METHOD documentproxy->close_document.
          CALL METHOD c_oi_errors=>show_message
            EXPORTING
              type = 'E'.
          FREE documentproxy.
        ENDIF.
        IF NOT olecontrol IS INITIAL.
          CALL METHOD olecontrol->destroy_control.
          FREE olecontrol.
        ENDIF.
    Thanks for your help.
    Mike Menkov.

    Hello, long time no see,
    but anyway, executing a macro prevents excel then to be closed over ole, as i've tried many ways to get it done, here is a work-around.
    it's frustating that I cannot use excel as Inplace there, because users could then easily USE or even UPLOAD their own excel-spreadsheets over the custom control with the use of ALV-Grid firstly, wich is really nice. Because of this 'bug', (i think it definitely is one, but don't know on wich side, MS or SAP) excel-spreadsheet functionality over ALV-Grid imho simply cannot be used fine with spreadsheets containing 'bigger' macros which where executed over ole - in eo_start_macro.
    For closing this issue, I just wanted to add how I could 'overcome' the sympthoms of this still remaining temp-files (+excel holding them open) when using excel + ole automation over SAPGUI:
    You could just NOT use excel "Inplace" on a custom control of a dynpro, but outside SAP, still OLE-driven.
    Start it in foreground guarantees you can close the temp-file with or without saving at a time and not surprisingly at the end on shutdown, because the controls of excel (and excel as a whole) are visible anytime - ole automation works also fine this way.
    This is the order of preparing excel and setting data into it i've done it, therefore i've created a single include for all the excel-ole stuff:
    (complete source could be looked up at http://pastebin.com/zmr6xdZm)
    1.eo_get_templ_uri
    2.eo_build_spreadsheet_interface - goes ahead with parameter inplace_enabled = SPACE
    3.eo_build_named_area
    4.eo_set_data_into_sheet
    5.eo_start_macro
    after the data is sent to excel (+ the macro on the spreadsheet has done it's job), excel is holding the filled temp file (spreadsheet) in foreground, so users can directly close it with- or without saving.
    *** using inplace_enabled = SPACE here, on Initializing the control
    CALL METHOD cl_control->init_control
       EXPORTING
         inplace_enabled          = ' '
         no_flush                 = 'X'
         INPLACE_SHOW_TOOLBARS    = insert_toolbar
         r3_application_name      = sy-cprog
         parent                   = cl_container
       IMPORTING
         error                    = error
       EXCEPTIONS
    *          javabeannotsupported     = 1  " ex. nicht im Minisap
         OTHERS                   = 2.
    *** and on Load document from BOR
         CALL METHOD cl_document->open_document
         EXPORTING
           "startup_macro    = 'DieseArbeitsmappe.start' "funkt nicht
           document_title = sy-cprog
           document_url   = doc_url
           no_flush       = 'X'
           open_inplace   = '  '
         IMPORTING
           retcode          = soiret
           error          = error.
         APPEND error TO t_errors.
       ENDIF.
    Cheers,
    David

  • Let me know exact purpose of Free memory statement...

    What happens when we write the statement like below:
    Free memory id ‘ZBTS_BAPIRET2'.
    Kindly let me know exact purpose of that….!
    Akshitha.

    Hi,
    Just Type FREE in the programe and press F! on that ,, no need to post ok all the best
    FREE - Resets a data object to its original value and releases the resources
    it occupied.
    Basic form    FREE f.
    Effect        FREE f has the same effect as CLEAR f, namely that a Data
                  object f is reset to the initial value corresponding to its
                  type.
                  Unlike CLEAR, FREE also releases any resources taken up by the
                  data object f. This can be important with internal tables ,
                  structures containing tables, and table work areas (created
                  using TABLES).
                  After FREE f, the data object f can be re-addressed at any
                  time. The only condition is that you may need to re-allocate
                  resources to the object.
    Note          If f is an internal table with header line (where the name f
                  in a sense has two meanings) the statement FREE f refers to
                  the body of the table, and the statement CLEAR f refers to the
                  header line.
    Note          Performance:
                  The runtime required to reset an internal table and free its
                  resources depends how much memory the internal table has been
                  occupying.
                  To reset a small internal table takes around  80 msn (standard
                  microseconds), a 200 KB table takes around 700 msn, and a 1 MB
                  table around 3500 msn.
                  If the table has an index or hash table (because it was  created using INSERT, DELETE or SORT, or edited using
                  COLLECT), the runtime increases, since the index or hash table
                  also need to be released.
    FREE - Releasing an Area of ABAP Memory
    Basic form    FREE MEMORY.
                   Addition:
                   ... ID key
                   In an ABAP Objects context, a more severe syntax check is
                   performed that in other ABAP areas. See ID must be specified.
    Effect        This statement releases an area of  ABAP Memory previously
                   created with an EXPORT TO MEMORY statement. After this, an
                   IMPORT ... FROM MEMORY statement would return the return code
                   4.
    Notes         -  FREE MEMORY deletes the entire ABAP-Memory, that is, all of
                      the data exported using EXPORT TO MEMORY.
                   -  Please consult Data Area and Modularization Unit
                      Organization documentation as well.
    Addition      ... ID key
    Effect        Only the ABAP-Memory with ID key is released.
    Related       EXPORT TO MEMORY, IMPORT FROM MEMORY
    Additional help  Deleting Data Clusters from Memory
    Return ->
    FREE - Release memory occupied by an external object
    Basic form    FREE OBJECT obj.
                   Addition
                   ... NO FLUSH
    Effect        Releases the memory needed for object obj. The object cannot
                   be processed afterwards.
                   The return code is set as follows:
                   SY-SUBRC = 0:  Object was released successfully.
                   SY-SUBRC = 1:  Error during communication with SAPgui.
                   SY-SUBRC = 2:  Error during function call in SAPgui.
                                  The OLE function modules are only implemented
                                  in Windows.
    Addition      ...NO FLUSH
    Effect        Collects all of the FREE OBJECT calls on the application
                   server before sending explicitly to the SAPgui in a single
                   operation by calling the function module FLUSH.
         FREE OBJECT belongs to a group of key words that allows you to process
    external objects with ABAP/4. At present, only the object model OLE2 is
    supported, i.e. all objects must be of type OLE2_OBJECT. This type and other
    necessary data are defined in the include program OLE2INCL.
    Example       Release an EXCEL object:
                   INCLUDE OLE2INCL.
                 DATA EXCEL TYPE OLE2_OBJECT.
                 CREATE OBJECT EXCEL 'Excel.Application'.
                 FREE   OBJECT EXCEL.
    elated       >CREATE OBJECT, SET PROPERTY, GET PROPERTY, CALL METHOD

Maybe you are looking for

  • Help with asp ... security levels

    I made a change to the security level for the end user. i add a security feature by adding 12345 to their security level. <%@LANGUAGE="VBSCRIPT"%> <%Option Explicit%> <% 'check to see if the page is submitted Dim validLogin Dim strErrorMessage Dim in

  • My ipad contrast lost now the screen is not showing clear

    Hello sir, My ipad 2 contrast has been automatically changed now its not showing clear its just looks like my ipad LCD is damaged so let me know the solution Thanks

  • Scans are too big Can I re-size a scan?

    I scan a lot of contracts and I just bought my photosmart 7525 today.  I scanned a contract but it would not email to my account.  i'm thinking that it was too big for my email account.  The size was only 9.25 mb but it still seemed like a lot becaus

  • How much is a hard drive 1(303) cost?

    I bought a hp laptop in 2010 and about a month ago it stopped working. When I ran a test on it, it said 303 failed (hard driver 1) . So it's useless right now.

  • Magic mouse won't scroll or double click on OSX 10.7.5

    Would upgrading to Mountain Lion fix the problem please?