• marko's avatar
    branches/zip: Instrument the buffer pool allocator and deallocator · ff0acd76
    marko authored
    for more accurate Valgrind debugging.
    
    univ.i: Introduce UNIV_DEBUG_VALGRIND, UNIV_MEM_VALID, and UNIV_MEM_INVALID.
    
    buf_LRU_block_free_non_file_page(): Invalidate the buffer frame
    with UNIV_MEM_INVALID().
    
    buf_LRU_get_free_block(): Declare the buffer frame valid
    with UNIV_MEM_VALID().
    
    Other memory is allocated and deallocated via malloc() and free(),
    which are already overridden by Valgrind.  Without the added
    instrumentation, accesses to free pages in the buffer pool cannot
    be caught.
    
    The diagnostics could probably be improved further by declaring all
    non-latched buffer frames invalid.
    ff0acd76
buf0lru.c 27.5 KB