(self, white_list)
return flushed
Flush all pages not included in the `white_list` by removing their pages. Note, this will not wipe them
        from memory if they were backed by a memory_backer, it will simply reset them to their initial state.
        Returns the list of pages that were cleared consisting of `(addr, length)` tuples.
        :param white_list: white list of regions in the form of (start, end) to exclude from the flush
        :return: a list of memory page ranges that were flushed
        :rtype: list
Flush all pages not included in the `white_list` by removing their pages. Note, this will not wipe them
        from memory if they were backed by a memory_backer, it will simply reset them to their initial state.
        Returns the list of pages that were cleared consisting of `(addr, length)` tuples.
        :param white_list: white list of regions in the form of (start, end) to exclude from the flush
        :return: a list of memory page ranges that were flushed
        :rtype: list
Flush all pages not included in the white_list by removing their pages . Note this will not wipe them from memory if they were backed by a memory_backer it will simply reset them to their initial state . Returns the list of pages that were cleared consisting of ( addr length ) tuples . : param white_list : white list of regions in the form of ( start end ) to exclude from the flush : return : a list of memory page ranges that were flushed : rtype : list
def flush_pages(self, white_list):
        """
        Flush all pages not included in the `white_list` by removing their pages. Note, this will not wipe them
        from memory if they were backed by a memory_backer, it will simply reset them to their initial state.
        Returns the list of pages that were cleared consisting of `(addr, length)` tuples.
        :param white_list: white list of regions in the form of (start, end) to exclude from the flush
        :return: a list of memory page ranges that were flushed
        :rtype: list
        """
        white_list_page_number = []

        for addr in white_list:
            for page_addr in range(addr[0], addr[1], self.page_size):
                pageno, _ = self.state.memory._divide_addr(page_addr)
                white_list_page_number.append(pageno)

        new_page_dict = {}
        flushed = []

        # cycle over all the keys ( the page number )
        for pageno, page in self._pages.items():
            if pageno in white_list_page_number:
                #l.warning("Page " + str(pageno) + " not flushed!")
                new_page_dict[pageno] = page
            else:
                #l.warning("Page " + str(pageno) + " flushed!")
                flushed.append((pageno, self.page_size))
        self._pages = new_page_dict
        return flushed
def flush_pages ( self , white_list ) : white_list_page_number = [ ] for addr in white_list : for page_addr in range ( addr [ 0 ] , addr [ 1 ] , self . page_size ) : pageno , _ = self . state . memory . _divide_addr ( page_addr ) white_list_page_number . append ( pageno ) new_page_dict = { } flushed = [ ] # cycle over all the keys ( the page number ) for pageno , page in self . _pages . items ( ) : if pageno in white_list_page_number : #l.warning("Page " + str(pageno) + " not flushed!") new_page_dict [ pageno ] = page else : #l.warning("Page " + str(pageno) + " flushed!") flushed . append ( ( pageno , self . page_size ) ) self . _pages = new_page_dict return flushed