optimized struct layout of torrent_info. removed boost.date_type types from public interface (replaced by time_t)

This commit is contained in:
Arvid Norberg
2010-08-21 22:10:16 +00:00
parent afd5567969
commit f70fbb45c0
9 changed files with 235 additions and 138 deletions

View File

@@ -633,6 +633,30 @@ namespace aux {
#define PRINT_SIZEOF(x) (*m_logger) << "sizeof(" #x "): " << sizeof(x) << "\n";
#define PRINT_OFFSETOF(x, y) (*m_logger) << " offsetof(" #x "," #y "): " << offsetof(x, y) << "\n";
PRINT_SIZEOF(announce_entry)
PRINT_OFFSETOF(announce_entry, url)
PRINT_OFFSETOF(announce_entry, message)
PRINT_OFFSETOF(announce_entry, last_error)
PRINT_OFFSETOF(announce_entry, next_announce)
PRINT_OFFSETOF(announce_entry, min_announce)
PRINT_OFFSETOF(announce_entry, tier)
PRINT_OFFSETOF(announce_entry, fail_limit)
PRINT_SIZEOF(torrent_info)
PRINT_OFFSETOF(torrent_info, m_files)
PRINT_OFFSETOF(torrent_info, m_orig_files)
PRINT_OFFSETOF(torrent_info, m_url_seeds)
PRINT_OFFSETOF(torrent_info, m_http_seeds)
PRINT_OFFSETOF(torrent_info, m_nodes)
PRINT_OFFSETOF(torrent_info, m_merkle_tree)
PRINT_OFFSETOF(torrent_info, m_info_section)
PRINT_OFFSETOF(torrent_info, m_piece_hashes)
PRINT_OFFSETOF(torrent_info, m_info_dict)
PRINT_OFFSETOF(torrent_info, m_creation_date)
PRINT_OFFSETOF(torrent_info, m_comment)
PRINT_OFFSETOF(torrent_info, m_created_by)
PRINT_OFFSETOF(torrent_info, m_info_hash)
PRINT_SIZEOF(union_endpoint)
PRINT_SIZEOF(request_callback)
PRINT_SIZEOF(stat)