Skip to content

Commit

Permalink
Increase probability of PGM activation from 1/1000 to 1/100
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=260362
<rdar://114042901>

Reviewed by Mark Lam.

* Source/bmalloc/libpas/src/libpas/pas_probabilistic_guard_malloc_allocator.c:
(pas_probabilistic_guard_malloc_initialize_pgm):
- Change probability from 1000 to 100.

Canonical link: https://commits.webkit.org/267366@main
  • Loading branch information
David Kilzer authored and Mark Lam committed Aug 28, 2023
1 parent 85d3ed8 commit df67bee
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ void pas_probabilistic_guard_malloc_initialize_pgm(void)
if (!pas_probabilistic_guard_malloc_is_initialized) {
pas_probabilistic_guard_malloc_is_initialized = true;

if (PAS_LIKELY(pas_get_fast_random(1000) >= 1)) {
if (PAS_LIKELY(pas_get_fast_random(100) >= 1)) {
pas_probabilistic_guard_malloc_can_use = false;
return;
}
Expand Down

0 comments on commit df67bee

Please sign in to comment.