heap-fragmentation

What is a contiguous memory block?

感情迁移 提交于 2019-11-26 09:28:30
问题 Just like in the title, what is a contiguous memory block? 回答1: One without any gaps in the addresses it occupies. You can probably just think of this as a "block", and think of something with a gap in the middle as "two blocks". The term comes up in the definition of an array as being "contiguous". That means the elements are laid out end-to-end, with no discontinuities and no padding between them (there may be padding inside each element, but not between elements). So an array of 5 4-byte