The module list is implemented within the server as a doubly-linked circular list. I did this for a couple of reasons. The first was that I had never programmed a circular list and I wanted to try it. Second, there would usually be multiple accesses to the same module in succession. By using a static pointer to the last accessed node in the list that will make it much more efficient for multiple consecutive lookups, since the first node we compare will be the last one that was found.
The module list isn't stored in any kind of order. New module nodes are stored in the list wherever the pointer happens to be located at that time.