(self, addr=None)
return region
Find the boundaries of the heap containing `addr`, default to the
        boundaries of the heap containing the top chunk for the thread's arena.
Find the boundaries of the heap containing `addr`, default to the
        boundaries of the heap containing the top chunk for the thread's arena.
Find the boundaries of the heap containing addr default to the boundaries of the heap containing the top chunk for the thread s arena .
def get_heap_boundaries(self, addr=None):
        """Find the boundaries of the heap containing `addr`, default to the
        boundaries of the heap containing the top chunk for the thread's arena.
        """
        region = self.get_region(addr) if addr else self.get_region(self.get_arena()['top'])

        # Occasionally, the [heap] vm region and the actual start of the heap are
        # different, e.g. [heap] starts at 0x61f000 but mp_.sbrk_base is 0x620000.
        # Return an adjusted Page object if this is the case.
        page = pwndbg.memory.Page(0, 0, 0, 0)
        sbrk_base = int(self.mp['sbrk_base'])
        if region == self.get_region(sbrk_base):
            if sbrk_base != region.vaddr:
                page.vaddr = sbrk_base
                page.memsz = region.memsz - (sbrk_base - region.vaddr)
                return page

        return region
def get_heap_boundaries ( self , addr = None ) : region = self . get_region ( addr ) if addr else self . get_region ( self . get_arena ( ) [ 'top' ] ) # Occasionally, the [heap] vm region and the actual start of the heap are # different, e.g. [heap] starts at 0x61f000 but mp_.sbrk_base is 0x620000. # Return an adjusted Page object if this is the case. page = pwndbg . memory . Page ( 0 , 0 , 0 , 0 ) sbrk_base = int ( self . mp [ 'sbrk_base' ] ) if region == self . get_region ( sbrk_base ) : if sbrk_base != region . vaddr : page . vaddr = sbrk_base page . memsz = region . memsz - ( sbrk_base - region . vaddr ) return page return region