[all-commits] [llvm/llvm-project] 405cea: [scudo] Manage pages with MemMap in SizeClassAlloc...

ChiaHungDuan via All-commits all-commits at lists.llvm.org
Wed Apr 5 14:35:12 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 405ceaa09de04332384ab4e12a2ae5a79eb7d10d
      https://github.com/llvm/llvm-project/commit/405ceaa09de04332384ab4e12a2ae5a79eb7d10d
  Author: Chia-hung Duan <chiahungduan at google.com>
  Date:   2023-04-05 (Wed, 05 Apr 2023)

  Changed paths:
    M compiler-rt/lib/scudo/standalone/CMakeLists.txt
    A compiler-rt/lib/scudo/standalone/mem_map.cpp
    A compiler-rt/lib/scudo/standalone/mem_map.h
    A compiler-rt/lib/scudo/standalone/mem_map_base.h
    M compiler-rt/lib/scudo/standalone/primary64.h
    M compiler-rt/lib/scudo/standalone/release.h

  Log Message:
  -----------
  [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


  Commit: 09239636dce5e0089da40dc45ba9c98c53a3af99
      https://github.com/llvm/llvm-project/commit/09239636dce5e0089da40dc45ba9c98c53a3af99
  Author: Chia-hung Duan <chiahungduan at google.com>
  Date:   2023-04-05 (Wed, 05 Apr 2023)

  Changed paths:
    M compiler-rt/lib/scudo/standalone/mem_map.cpp
    M compiler-rt/lib/scudo/standalone/mem_map.h
    M compiler-rt/lib/scudo/standalone/mem_map_base.h
    M compiler-rt/lib/scudo/standalone/secondary.h

  Log Message:
  -----------
  [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


  Commit: 4151477021170d8937f8fc820187d5934eb93c7d
      https://github.com/llvm/llvm-project/commit/4151477021170d8937f8fc820187d5934eb93c7d
  Author: Chia-hung Duan <chiahungduan at google.com>
  Date:   2023-04-05 (Wed, 05 Apr 2023)

  Changed paths:
    M compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
    M compiler-rt/lib/scudo/standalone/tests/common_test.cpp
    M compiler-rt/lib/scudo/standalone/tests/map_test.cpp
    M compiler-rt/lib/scudo/standalone/tests/memtag_test.cpp

  Log Message:
  -----------
  [scudo] Switch to use MemMap in tests

Reviewed By: cferris

Differential Revision: https://reviews.llvm.org/D146570


Compare: https://github.com/llvm/llvm-project/compare/3c76e5f0c868...415147702117


More information about the All-commits mailing list