×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    224

    Exclamation S60 3rd Edition Device and Heap limitation!

    Hi,

    I have developed a downloading application for S60 3rd edtion devices. I noticed a very strange thing. I was testing of downloading a music file about 2 MB. In my downloadin application, It receives a partial chunks and expands dynamic heap memory and stores the downloading parts. However downloading hangs after downloading 800 KB. I could not allocate more space than 800 KB. I don't know how this is possible. This same application works in all other S60 devices.

    I am just wondering, is there a default limitation of heap memory in S60 3rd edition devices. Should the dynamic heap be definded in the MMP file or so. Rightnow, my downloading application does not work because of this kind of limitation.

    It would be very appreciable if someone knows what is going on with S60 3rd edition devices.
    Regards,
    shagor

  2. #2
    Regular Contributor
    Join Date
    May 2005
    Location
    Brasov, Romania
    Posts
    431

    Re: S60 3rd Edition Device and Heap limitation!

    with the default settings you cannot alloc more than one megabyte in 3rd edition

    Use this in your E32Main before EikStart::RunApplication call:
    Code:
    RHeap *heap = UserHeap::ChunkHeap(0, 0x100000, 0x1400000); //use your values here
    User::SwitchHeap(heap);

  3. #3
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    224

    Thumbs up Re: S60 3rd Edition Device and Heap limitation!

    Hi iulian,

    Thanks a lot, it works perfectly.

    I have not found in the SDK doc about ChunkHeap method which takes 3 parameter. There are 2 variations of ChunkHeap method in UserHeap. One takes 6 parameters and other takes 7 parameters.

    RHeap *heap = UserHeap::ChunkHeap(0, 0x100000, 0x1400000);

    One thing, could you explain what are these 3 parameters. 0x100000, is it in KB or MB? The same for 0x1400000, KB or MB or just bytes.
    Regards,
    shagor

  4. #4
    Regular Contributor
    Join Date
    May 2005
    Location
    Brasov, Romania
    Posts
    431

    Re: S60 3rd Edition Device and Heap limitation!

    Quote Originally Posted by khurshed79
    Hi iulian,

    Thanks a lot, it works perfectly.

    I have not found in the SDK doc about ChunkHeap method which takes 3 parameter. There are 2 variations of ChunkHeap method in UserHeap. One takes 6 parameters and other takes 7 parameters.

    RHeap *heap = UserHeap::ChunkHeap(0, 0x100000, 0x1400000);

    One thing, could you explain what are these 3 parameters. 0x100000, is it in KB or MB? The same for 0x1400000, KB or MB or just bytes.
    Those two values, 0x100000 and 0x1400000 are minLength and maxLength of the chunk in bytes. So in my example I created a chunk with minimum 1MB and maximum 20MB.

  5. #5
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    224

    Thumbs up Re: S60 3rd Edition Device and Heap limitation!

    Hi iulian,

    Thanks.

    Confused from your answer.

    0x100000 and 0x1400000 in bytes ---> 1MB and maximum 20MB (How???)

    If those values are in bytes:

    100000/1024=97.65625 KB
    1400000/1024=1367.1875 KB
    1367.1875/1024=1.33 MB

    How do you get 1MB and 20MB?

    Could you please explain it in details.

    Thanks in advance.
    Regards,
    shagor

  6. #6
    Regular Contributor
    Join Date
    May 2005
    Location
    Brasov, Romania
    Posts
    431

    Re: S60 3rd Edition Device and Heap limitation!

    Sorry, I forgot to tell you.... thoxe 0x.... values are in hexa

  7. #7
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    224

    Thumbs up Re: S60 3rd Edition Device and Heap limitation!

    Hi iulian,

    Thanks for everything. It was very quick solution to my problem.
    Regards,
    shagor

Posting Permissions

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