Memory Hardware
PIC embedded controller memory methods
SX embedded controller memory methods
Dynamic memory management works, and much better than generally believed.
Potential problems:
-
Long lived objects: If the allocator could allocate a block only in a very
awkward position and then the block stays for a long time, it might prevent
defragmenation of the two neighbouring free blocks. Therefore you should
allocate and deallocate blocks frequently in order to give the defrag mechanism
many chances to work.
-
Lots of small objects: Memory management needs to implement some data structures
on the free blocks. Therefore the free blocks need a certain minimum size
(usually at least three adresses must fit in). Therefore, if you request
a byte, you mivht get in fact twelve or more. However, some allocation mechanisms
treat byte or word requests specially (with other drawbacks of course).
See also: