mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Use the HeapWalk API for heap iteration instead of the Heap32First/Next API, which was known to be slow. Since HeapWalk only works locally, it requires using a remote thread and a DLL.
29 lines
873 B
C
29 lines
873 B
C
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See https://swift.org/LICENSE.txt for license information
|
|
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#if defined(_WIN32)
|
|
|
|
#include <stdint.h>
|
|
|
|
#define BUF_SIZE 512
|
|
#define SHARED_MEM_NAME_PREFIX "Local\\SwiftInspectFileMapping"
|
|
#define READ_EVENT_NAME_PREFIX "Local\\SwiftInspectReadEvent"
|
|
#define WRITE_EVENT_NAME_PREFIX "Local\\SwiftInspectWriteEvent"
|
|
#define WAIT_TIMEOUT_MS 30000
|
|
|
|
struct HeapEntry {
|
|
uintptr_t Address;
|
|
uintptr_t Size;
|
|
};
|
|
|
|
#endif
|