×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Sep 2003
    Posts
    11

    3rd ed emulator heap size

    Hi,

    it seems to me that 3rd ed emulator is more strict on maximum heap size than previous sdks. Although the amount of free memory can be set to whatever from emulator preferences, the maximum heap size cannot. As max heap size defaults to 1M, this newest sdk takes this strictly and restricts apps to 1M of memory (allocations after that fail).

    In the mmp file, there is the epocheapsize command but it does not seem to affect the situation. Some other sources claim that it is ignored in wins builds. Earlier SDKs let me allocate more memory without even using epocheapsize at all.

    So, am I doing something wrong, is this really a feature or how could I extend the heap size?

    (you can always create a larger heap of your own, and use User::SwitchHeap, but that is rather difficult because some allocations have already been done before my app gets a chance to do so from its own thread -> result: crash. If I used several threads, I could set the heap when creating those threads, but my app is single-threaded.)

  2. #2
    Registered User
    Join Date
    Apr 2005
    Posts
    33

    Re: 3rd ed emulator heap size

    I'm stuck into same thing - 1MB of heap and that's all. Have you solved the situation for yourself?

    Ahti.

  3. #3
    Registered User
    Join Date
    Sep 2003
    Posts
    11

    Re: 3rd ed emulator heap size

    On the emulator I'm doing the heap switching in E32Main before calling RunApplication and it works. On device builds I do not do any heap switching. In the emulator, this causes a crash when the application exits but at least you get the memory.

    TInt E32Main()
    {
    RHeap *heap = UserHeap::ChunkHeap(0,100000,10000000,100000);
    User::SwitchHeap(heap);
    return EikStart::RunApplication(NewApplication);
    }

  4. #4
    Registered User
    Join Date
    Apr 2005
    Posts
    33

    Re: 3rd ed emulator heap size

    the code works, thanks.

    And actually - EPOCHEAPSIZE does the trick for me as well.

    Ahti.

  5. #5
    Registered User
    Join Date
    Mar 2003
    Posts
    15

    Re: 3rd ed emulator heap size

    Does this work for a device? On the emulator it is fine, but one I run it on the target, it crashes.

  6. #6
    Registered User
    Join Date
    Mar 2003
    Posts
    15

    Re: 3rd ed emulator heap size

    Finally I increased the min heap size and the stack size on the mmp. My application is running properly again:

    EPOCHEAPSIZE 500000 10000000
    EPOCSTACKSIZE 0x8000

  7. #7
    Registered User
    Join Date
    Jul 2003
    Posts
    190

    Re: 3rd ed emulator heap size

    Yup, it works.
    Actually, EPOCHEAPSIZE is translated as parameter for elf2e32.exe
    --heap=min,max

  8. #8
    Registered User
    Join Date
    Mar 2007
    Posts
    3

    Re: 3rd ed emulator heap size

    hi apsaarin!habe you been able to solve the problem you're having?I'm having the same problem.I'm not able to set heap size either on the mmp file or the project properties window.Your workaround works onthe emulator but not on device.If you were able to solve the issue can you please help.Thanks!

Similar Threads

  1. what is the Nokia 9500 3rd party application size restriction
    By kollepara in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2005-07-07, 03:05
  2. The correct meaning of MAX JAR size
    By bigrio in forum Mobile Java General
    Replies: 1
    Last Post: 2004-11-16, 10:30
  3. The correct meaning of MAX JAR size
    By bigrio in forum Mobile Java General
    Replies: 0
    Last Post: 2004-11-13, 11:03
  4. A Different Jar Size Limit Problem
    By cicdem in forum Mobile Java General
    Replies: 0
    Last Post: 2004-06-17, 15:01
  5. User break point error in Grid
    By ag24master in forum Symbian User Interface
    Replies: 0
    Last Post: 2003-08-07, 08:20

Posting Permissions

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