diff options
author | Ian Moffett <ian@osmora.org> | 2025-06-13 23:53:22 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-06-14 00:28:43 -0400 |
commit | a9fb11245f3ccc422089ed60a1ce57b7cb2d1c2a (patch) | |
tree | 32901fc4dd37427ff982a4aef41eedaa1c2f1a2c /lib/libc/src/main.c | |
parent | fdeb7fd1ba1c515eaf84b6b46388231d980ce756 (diff) |
kernel: Prevent physmem clobbers + zero memory
To prevent a situation where there is a data race between one thread
freeing physical memory and one allocating physical memory. Do not
immediately reuse freed physical memory. Instead, keep allocating
upwards and once there is no more room, wrap the last_idx back to the
bitmap free index. We now also zero allocated physical memory for
security reasons.
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'lib/libc/src/main.c')
0 files changed, 0 insertions, 0 deletions