×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Regular Contributor
    Join Date
    Jun 2003
    Posts
    81

    Question VERY strange memory full problem..

    Hi..

    I'm having a strange "memory full" problem..
    Strange for two reason:
    - only one small image loaded (so is not the classic full memory for too many images)
    - on 3650 works fine, but errors occus in 6600

    I manage a matrix of short number of 50x50, and there is a recursive funcion that is called about 500 times..

    Some could say that this is too much..but why it works on 3650?

    I have also tryed putting System.gc() but with no resuls..

    Anyone can help me?

    Many thanks!!

  2. #2
    Regular Contributor
    Join Date
    Jun 2003
    Posts
    81
    I think is a stack overflow meory problem due to the fact that the recursive functione is called 500 times..
    But why this not happens on 3650?

    Any ideas?

    Thanks!

  3. #3
    Regular Contributor
    Join Date
    Jun 2003
    Posts
    81
    Incredible!
    It works also on 7650!!!

    I don't konw how to say..
    Is midp 2.0 or 6600 problem?!?!?

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    I'd wager that it's related to the fact that the phone is MIDP 2.0 and uses more memory because of that. And I'd agree that it is a stack overflow. But there is always the possibility that you have run into a phone-specific bug.

    You could try making the recursion less deep and see if it works on the 6600.

    shmoove

  5. #5
    Regular Contributor
    Join Date
    Jun 2003
    Posts
    81
    shmoove,

    many thanks for suggestion..
    I've tryed to manage a 11x11 matrix of byte and it works (the recursive procedure is called max 15 times)
    But for this type of game is not enought.
    With 33x33 there is still the error..

    I don't konw..Insted of increasing memory capacity and management, the new mobile are less power..

    Sigh..

    Thanks again.

    PS: With the mobile game instruction I should write: attention: this game is only for hight performance mobile..so..If you have a modern mobile you have to get an oldest one in order to play...

  6. #6
    Regular Contributor
    Join Date
    Jun 2003
    Posts
    81
    Any other suggestion?
    Thanks.

  7. #7
    Registered User
    Join Date
    Mar 2003
    Posts
    33
    Try to convert your recursive method into a non-recursive one, and you should be fine. Recursively calling a method 500 times consumes lots of memory that could be easily avoided by using a non-recursive method.

  8. #8
    Regular Contributor
    Join Date
    Jun 2003
    Posts
    81
    Many thanks..
    I will try and I will let you know..

  9. #9
    Regular Contributor
    Join Date
    Jun 2003
    Posts
    81
    It works..
    But is extremely slow..
    So it can't be applied for this kind of game...
    Sigh..

  10. #10
    Registered User
    Join Date
    Mar 2003
    Posts
    33
    well, then it would also be slow recursively (probably slower), unless you use a completely different kind of algorithm. so, it looks like you're just trying to do too much, or you're doing it inefficiently. good luck!

Posting Permissions

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