Skip to content

Commit

Permalink
Use has bits function.
Browse files Browse the repository at this point in the history
  • Loading branch information
r12f committed Dec 16, 2023
1 parent 5bb3c15 commit 9200420
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gef.py
Original file line number Diff line number Diff line change
Expand Up @@ -6302,11 +6302,11 @@ def process_chunk(self, chunk: GlibcChunk) -> None:
self.size_distribution[chunk.size] = per_size_summary
per_size_summary.process_chunk(chunk)

if chunk.flags & GlibcChunk.ChunkFlags.PREV_INUSE:
if chunk.has_p_bit():
self.flag_distribution["PREV_INUSE"].process_chunk(chunk)
if chunk.flags & GlibcChunk.ChunkFlags.IS_MMAPPED:
if chunk.has_m_bit():
self.flag_distribution["IS_MAPPED"].process_chunk(chunk)
if chunk.flags & GlibcChunk.ChunkFlags.NON_MAIN_ARENA:
if chunk.has_n_bit():
self.flag_distribution["NON_MAIN_ARENA"].process_chunk(chunk)

def print(self) -> None:
Expand Down

0 comments on commit 9200420

Please sign in to comment.