memory usage and the thread cache

I’m trying to get a better understanding of thread memory usage. Assuming the following buffers were allocated during a query, and the thread is to be returned to the thread cache rather than closed at the end of the query. If they were used, are the following buffers kept allocated, or are they released before the thread is put in the cache?

  1. The thread stack (I think this stays allocated)
  2. The connection buffer (This may be released or shrunk?)
  3. The result buffer (This may be released or shrunk?)
  4. The read_buffer
  5. The read_rnd_buffer
  6. The sort_buffer
  7. The myiasm_sort_buffer
  8. The bulk_insert_buffer
  9. The binlog cache buffer

Thanks for any assistance.

Have you seen this blog post? http://www.mysqlperformanceblog.com/2006/05/17/mysql-server- memory-usage/
It explains MySQL memory usage