+struct MsgBuf_str_data {
+ const struct MsgBuf *msgbuf;
+ unsigned int caps;
+};
+
+#define MSGBUF_CACHE_SIZE 32
+
+struct MsgBuf_cache_entry {
+ unsigned int caps;
+ buf_head_t linebuf;
+ struct MsgBuf_cache_entry *next;
+};
+
+struct MsgBuf_cache {
+ const struct MsgBuf *msgbuf;
+ char message[DATALEN + 1];
+ unsigned int overall_capmask;
+
+ /* Fixed maximum size linked list, new entries are allocated at the end
+ * of the array but are accessed through the "next" pointers.
+ *
+ * This does not use rb dlink to avoid unnecessary individual allocations.
+ */
+ struct MsgBuf_cache_entry entry[MSGBUF_CACHE_SIZE];
+ struct MsgBuf_cache_entry *head; /* LRU cache head */
+};
+