4 ms·
Sorry, I don't follow.
by a-priori 13y ago
Sorry, I don't follow.
- hga 13y agoAre you allocating from and deallocating to a heap? If so, I've heard that can result in non-optimal results, that would also require dynamic analysis to avoid unacceptable worst cases.
- a-priori 13y agoBy 'non-optimal results' do you mean heap fragmentation? If so then yes that's a major concern with dynamic memory allocation in real-time environments. These systems must be designed to run continuously for years at a time and have limited memory, so any allocator that causes non-zero heap fragmentation is right out. There are allocators that don't do that. One way is to use a pool allocator which allocates fixed-size blocks. Since all blocks are the same size, fragmentation can't occur.