mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-04-19 22:10:19 +02:00
sanity check page size at runtime
This commit is contained in:
parent
d779d41721
commit
0e2f3d1015
1 changed files with 4 additions and 0 deletions
4
malloc.c
4
malloc.c
|
@ -594,6 +594,10 @@ COLD static void init_slow_path(void) {
|
||||||
fatal_error("pthread_atfork failed");
|
fatal_error("pthread_atfork failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sysconf(_SC_PAGESIZE) != PAGE_SIZE) {
|
||||||
|
fatal_error("page size mismatch");
|
||||||
|
}
|
||||||
|
|
||||||
struct random_state rng;
|
struct random_state rng;
|
||||||
random_state_init(&rng);
|
random_state_init(&rng);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue