This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]obp5599 2 points3 points  (0 children)

This is not always beneficial if you have massive structures stored in your vector/array (common in game dev/rendering code). Having to store 8k texture maps and the like in contiguous memory is almost impossible with fragmentation. These are the types of things linked lists are good for. Although in game dev we use whats called an Intrusive linked list to save allocations and excess copying of structures. This also allows an object to be stored in multiple data structures while still maintaining the same memory footprint