Created
September 10, 2012 13:14
-
-
Save kennethho/3690842 to your computer and use it in GitHub Desktop.
Memory layout of STL linked list node
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct _List_node_base | |
{ | |
_List_node_base* _M_next; | |
_List_node_base* _M_prev; | |
// .... | |
}; | |
template<typename _Tp> | |
struct _List_node : public __detail::_List_node_base | |
{ | |
///< User's data. | |
_Tp _M_data; | |
// .... | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment