Files
Hiroshi Yamauchi af890f3cbf Improve the dump-arrays performance on Windows
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.
2023-07-14 16:13:10 -07:00

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