Skip to content
Snippets Groups Projects
  • Avi Kivity's avatar
    56b1f6b2
    memory: debug allocator · 56b1f6b2
    Avi Kivity authored
    This allocator works by giving each allocation its own virtual address
    range which is not reused for later allocations.  After a free(), the
    range is made inaccessible, forever, so use-after-free will result in a
    page fault.
    
    Sub-page overruns are also detected by filling unallocated space with a
    pattern, and checking whether the pattern has been altered during free().
    56b1f6b2
    History
    memory: debug allocator
    Avi Kivity authored
    This allocator works by giving each allocation its own virtual address
    range which is not reused for later allocations.  After a free(), the
    range is made inaccessible, forever, so use-after-free will result in a
    page fault.
    
    Sub-page overruns are also detected by filling unallocated space with a
    pattern, and checking whether the pattern has been altered during free().