Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add DEBUGASSERT_MM_FREE_NODE macro #5968

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Oct 23, 2023

  1. mm/mm_heap: add mm_dump_heap_free_node_list function

    add mm_dump_heap_free_node_list function.
    This function prints the hex valuse contents of heap free nodes using heap free node list.
    
    example logs:
    
    ` #########################################################################################
      Dump heap free node list
      [ndx], [HEAD]: [FREE NODES(SIZE)]
    ` #########################################################################################
        0, 1003dc80:
        1, 1003dc98:
        2, 1003dcb0:
        3, 1003dcc8: 0200f220(240)
        4, 1003dce0:
        5, 1003dcf8: 02012dc0(592) 02016b70(576)
        6, 1003dd10: 0201eb70(1488)
        7, 1003dd28:
        8, 1003dd40:
        9, 1003dd58:
       10, 1003dd70:
       11, 1003dd88:
       12, 1003dda0:
       13, 1003ddb8:
       14, 1003ddd0:
       15, 1003dde8:
       16, 1003de00: 02201a10(1828320)
       17, 1003de18:
       18, 1003de30:
    `  #########################################################################################
    
    Signed-off-by: eunwoo.nam <eunwoo.nam@samsung.com>
    ewoodev committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    756b930 View commit details
    Browse the repository at this point in the history
  2. mm/mm_heap: move dump_node to mm_dump_node

    add the dump_node function, which was static, to the header for use in other codes and move it to mm_heap_dbg.c.
    
    Signed-off-by: eunwoo.nam <eunwoo.nam@samsung.com>
    ewoodev committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    a052c05 View commit details
    Browse the repository at this point in the history
  3. mm/mm_heap/mm_node.h: add DEBUGASSERT_MM_FREE_NODE macro

    The back link of heap free node cannot be null at any time, If null, it is an assert situation.
    Therefore, in the REMOVE_NODE_FROM_LIST macro, null is checked with DEBUGASSERT.
    But we can't known why the back link of the free node became null.
    
    Therefore, This commit adds DEBUGASSERT_MM_FREE_NODE macro, that print addresses of free nodes, head
    list of free node link and corrupted node nearby node for debugging.
    
    Signed-off-by: eunwoo.nam <eunwoo.nam@samsung.com>
    ewoodev committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    6d39ad7 View commit details
    Browse the repository at this point in the history