OSDN Git Service
Fix two issues with the card table.
Several tricks are used to adjust the base of the card table to save
instructions in the write barrier. This change corrects two
situtations where the card table did not properly account for the
effects of these tricks.
First, the card table is over allocated to ensure that the start
address can be magically aligned. When releasing the allocation these
additional bytes were not supplied to munmap creating a potential
leak.
Second, the valid card check did not use the right base address for a
containment check. The check used the allocation base which is may be
lower than the actual starting address. This would cause valid cards
at the high end of the heap to be considered invalid and invalid cards
at the low end of the heap to be considered valid.
Change-Id: I83bf4167b7c081c8626b6ff504342f42d0e776a2