(self, req_size)
return size
Takes an allocation size as requested by the user and modifies it to be a suitable chunk size.
Takes an allocation size as requested by the user and modifies it to be a suitable chunk size.
Takes an allocation size as requested by the user and modifies it to be a suitable chunk size .
def _make_chunk_size(self, req_size):
        """
        Takes an allocation size as requested by the user and modifies it to be a suitable chunk size.
        """
        size = req_size
        size += 2 * self._chunk_size_t_size  # Two size fields
        size = self._chunk_min_size if size < self._chunk_min_size else size
        if size & self._chunk_align_mask:                                         # If the chunk would not be aligned
            size = (size & ~self._chunk_align_mask) + self._chunk_align_mask + 1  # Fix it
        return size
def _make_chunk_size ( self , req_size ) : size = req_size size += 2 * self . _chunk_size_t_size # Two size fields size = self . _chunk_min_size if size < self . _chunk_min_size else size if size & self . _chunk_align_mask : # If the chunk would not be aligned size = ( size & ~ self . _chunk_align_mask ) + self . _chunk_align_mask + 1 # Fix it return size