<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/test/lib/alist.c, branch v2025.01-rc1</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/test/lib/alist.c?h=v2025.01-rc1</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/test/lib/alist.c?h=v2025.01-rc1'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2024-08-07T14:49:10Z</updated>
<entry>
<title>alist: Add support for an allocated pointer list</title>
<updated>2024-08-07T14:49:10Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2024-07-30T14:39:37Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=75581e419aa2bf5cc1b4c3ec79701017b44d1a66'/>
<id>urn:sha1:75581e419aa2bf5cc1b4c3ec79701017b44d1a66</id>
<content type='text'>
In various places it is useful to have an array of structures, but allow
it to grow. In some cases we work around it by setting maximum number of
entries, using a Kconfig option. In other places we use a linked list,
which does not provide for random access and can complicate the code.

Introduce a new data structure, which is a variable-sized list of structs
each of the same, pre-set size. It provides O(1) access and is reasonably
efficient at expanding linearly, since it doubles in size when it runs out
of space.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
</feed>
