Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lldb: convert heap_page_obj_limit from a float to int #4467

Merged
merged 1 commit into from
May 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions misc/lldb_cruby.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,12 +545,9 @@ def __init__(self, page, target):
def is_valid(self):
heap_page_header_size = self.target.FindFirstType("struct heap_page_header").GetByteSize()
rvalue_size = self.tRValue.GetByteSize()
heap_page_obj_limit = (HEAP_PAGE_SIZE - heap_page_header_size)/rvalue_size
heap_page_obj_limit = int((HEAP_PAGE_SIZE - heap_page_header_size) / rvalue_size)

if (self.num_slots > heap_page_obj_limit) or (self.num_slots < heap_page_obj_limit - 1):
return False
else:
return True
return (heap_page_obj_limit - 1) <= self.num_slots <= heap_page_obj_limit

def __iter__(self):
return self
Expand Down