Heap algorithm

Comments

2 comments

  • Avatar
    Paul Curtis

    CrossWorks uses a best-fit strategy for the heap.  And yes, in order to set the heap up, you do need initialized data, but it's possible that we may change that in the future.  For real-time response, the default heap strategy may not be the best for you, in which case use a binary or Fibonacci buddy heap.  In a future CrossWorks release, we will offer multiple heap implementations as well as multiple simultaneous heaps.  I have already implemented the binary buddy heap.

    0
    Comment actions Permalink
  • Avatar
    Marek

    If my understanding of the heap algorithms is correct, you usually need only a few bytes of data in the heap to be initialized (the variables that you use to keep track of the free memory), so it might be a waste of flash memory to initialize the full heap to the needed data and zero the rest; a heap_init functions might do the trick as well (though I can use some external code if I need this feature).

    I will have a look at the other memory allocation algorithms, thanks for the tip.

    The possibility to choose another heap algorithm seems interesting..

    The Free Dictionary Slovnik EN->CZ Slovnik CZ->EN Wikipedia Google Answers.com Urban Dictionary<>0
    decwgau
    0
    Comment actions Permalink

Please sign in to leave a comment.