mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
lldb: convert heap_page_obj_limit from a float to int
This commit is contained in:
parent
550b02e479
commit
578e6416e7
Notes:
git
2021-05-07 01:55:05 +09:00
1 changed files with 2 additions and 5 deletions
|
@ -545,12 +545,9 @@ class HeapPageIter:
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue