×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    24

    [moved&merged] How to handle low memory condition

    Hi ,

    How did you handle low memory situation?

    For instance my phone is freezing while starting my symbian app when the memory is low.

    Basically where should you check for low memory and how how do a get en error message instead of some unexpected behaviour like phone freezing ?

    I have a server application which does not have any UI, it runs in background.

    any sample code ?

    Thank you!
    Last edited by sym1; 2010-05-08 at 20:55. Reason: Same message

  2. #2
    Registered User
    Join Date
    Jun 2009
    Posts
    24

    How to handle low memory situation in Symbian ?

    Hi ,

    How to handle low memory situation in Symbian?

    For instance my phone is freezing while starting my symbian app when the memory is low. lets say when I have 0 RAM.
    I am using N97 for development.

    Basically where should you check for low memory and how how do a get en error message instead of some unexpected behaviour like phone freezing ?

    I have a server application which does not have any UI, it runs in background.

    do I have to check it before starting the server ? any sample code ?

    Thanks!

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,572

    Re: How to handle low memory situation in Symbian ?

    It matters a lot when it occurs:
    - if the device is unresponsive prior to giving control to your E32Main, there are no obvious things you could do
    - however if it is your own code which starts allocating large amounts of memory, an obvious thing could be having a good estimation of your initial memory requirements, and specifying that one as initial heap size (with EPOCHEAPSIZE keyword in the .mmp - Carbide.c++ also supports this setting in its .mmp editor).

  4. #4
    Registered User
    Join Date
    Jun 2009
    Posts
    24

    Re: [moved&merged] How to handle low memory condition

    Hi Thanks for your response!

    My requirement is like, if there is not enough memory(RAM) in the phone while I start my application, instead of freezing or crashing, my app/system should display an error message like "Low memory!" or "not enough memory!".

    There are possibilitiles that the phone memory is already full by other applications, and I try starting my application.

    Currently, to create this scenarion i am using a memory eater tool to eat memory and my phone is freezing while I set the free RAM memory to bellow 300KB or lets say 0KB.

    I have noticed that some applications showing error messages like "not enough memory" while starting, if there are not enough memory in the phone. I just need a simple case like that.

    Thanks!

  5. #5
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,355

    Re: [moved&merged] How to handle low memory condition

    Simple!? Well, what can be more simple that this:
    - estimate how much memory your app needs
    - when app starts, try to allocate a equally big memory bloc
    - if allocation succeeds, delete the allocated memory and continue with your application
    - if the allocation fails, [show a note and] exit
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  6. #6
    Registered User
    Join Date
    Jun 2009
    Posts
    24

    Re: [moved&merged] How to handle low memory condition

    Appriciate your response!

    This is the same way of allocation I had thought but I was confused with mmp file heap memory allocation.

    Then what is the difference between manually allocating memory for my app before the application starts compared to the one specified in mmp file ?

    BTW, do you mean allocating just before starting or creating the application process ?

    Thanks

Similar Threads

  1. Is there a way to handle No memory error?
    By ababo in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-11-18, 11:19
  2. Symbian Audio, low memory issues
    By abhatta78 in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2008-05-27, 16:32
  3. Concerns with MEM-02 (Low Storage Memory During Execution)
    By lenclud in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 2
    Last Post: 2007-02-20, 18:50
  4. can not successfully link any sample using .NET
    By lobotomat in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2002-08-20, 00:29
  5. 9210 and 9210i java memory
    By allams in forum Mobile Java General
    Replies: 0
    Last Post: 1970-01-01, 02:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •