1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:27:45 +00:00

Kernel+LibC: Add MAP_RANDOMIZED flag for sys$mmap()

This can be used to request random VM placement instead of the highly
predictable regular mmap(nullptr, ...) VM allocation strategy.

It will soon be used to implement ASLR in the dynamic loader. :^)
This commit is contained in:
Andreas Kling 2021-01-28 14:55:06 +01:00
parent d3de138d64
commit b6937e2560
5 changed files with 43 additions and 7 deletions

View file

@ -87,6 +87,7 @@ public:
Optional<Range> allocate_anywhere(size_t, size_t alignment = PAGE_SIZE);
Optional<Range> allocate_specific(VirtualAddress, size_t);
Optional<Range> allocate_randomized(size_t, size_t alignment);
void deallocate(const Range&);
void dump() const;