|
|
|
|
|
by zbuf
3461 days ago
|
|
> memory efficiency. If you allocate a Foo, you also allocate everything you need for Foo to be on all of the lists it may appear on. I can't speak for the kernel developers, but for the same line of reasoning it may be more significant that there is the lack of error paths. When you allocate an 'object', further changes of state (eg. added or removal to other lists) in its lifetime can be done without the possibility of running out of memory or address space. This can be a huge benefit to overall program structure in certain types of application. In contrast, addition or removal to a vector or flat list can ultimately require various actions to happen. |
|