Greg Thompson | 8c47048 | 2023-05-26 06:36:12 | [diff] [blame] | 1 | // Copyright 2023 The Chromium Authors |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_INSTALLER_MINI_INSTALLER_MEMORY_RANGE_H_ |
| 6 | #define CHROME_INSTALLER_MINI_INSTALLER_MEMORY_RANGE_H_ |
| 7 | |
| 8 | #include <stddef.h> |
| 9 | #include <stdint.h> |
| 10 | |
| 11 | namespace mini_installer { |
| 12 | |
| 13 | // Represents a range of bytes in the process's address space. |
| 14 | struct MemoryRange { |
| 15 | const uint8_t* data = nullptr; |
| 16 | size_t size = 0; |
| 17 | |
| 18 | bool empty() const { return size == 0; } |
| 19 | }; |
| 20 | |
| 21 | } // namespace mini_installer |
| 22 | |
| 23 | #endif // CHROME_INSTALLER_MINI_INSTALLER_MEMORY_RANGE_H_ |