3 Commits

Author SHA1 Message Date
Chia-hung Duan
bfa02523b2 [scudo] The BaseAddr should be MappedBase in releasePagesToOS()
This is used to make MemMapDefault be compliant with legacy APIs.

Reviewed By: fabio-d

Differential Revision: https://reviews.llvm.org/D148141
2023-04-14 19:18:55 +00:00
Chia-hung Duan
09239636dc [scudo] Manage pages with MemMap in Secondary Allocator
Replace the uses of raw map()/unmap(), .etc calls with MemMap. Also
remove the direct use of MapPlatformData in the secondary allocator.

Also add setMemoryPermission() in MemMap.

Reviewed By: cryptoad

Differential Revision: https://reviews.llvm.org/D146454
2023-04-05 21:28:55 +00:00
Chia-hung Duan
405ceaa09d [scudo] Manage pages with MemMap in SizeClassAllocator64
Introduce a new data structure to manage the allocated pages from the
system. This is meant to deprecate certain memory system call wrappers
in Scudo, e.g., map()/unmap(). Besides, we would like to make
MapPlatformData to be appeared in platform specific data structure only.
Given that there are several allocators in Scudo and each of them has
different way of page management. The deprecation will be done in
several CLs. In this commit, we start from SizeClassAllocator64.

Reviewed By: cferris

Differential Revision: https://reviews.llvm.org/D146009
2023-04-05 21:28:54 +00:00