---
title: MemorySegment
description: MemorySegment represents all allocated pages of a VM memory segment.
source_url:
  html: https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/memory-segment/
  md: https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/memory-segment.md
---

# MemorySegment

MemorySegment represents all allocated pages of a VM memory segment.

**Package:** `thru.services.v1`

## Fields

| Field | Type | # | Description |
| - | - | - | - |
| `segment_type` | `uint32` | 1 · optional | VM segment type (5=stack, 7=heap) |
| `segment_size` | `uint64` | 2 · optional | Total virtual size of segment in bytes |
| `pages` | repeated [`MemoryPage`](https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/memory-page.md) | 3 · optional | |
