---
name: "RtlSizeHeap"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/RtlSizeHeap"
---

# RtlSizeHeap(3w)

## NAME

**RtlSizeHeap** (NTDLL.@)

## SYNOPSIS

SIZE\_T RtlSizeHeap\
  (\
   HANDLE      *heap*,\
   ULONG       *flags*,\
   const void\* *ptr*\
  )

## DESCRIPTION

Get the actual size of a memory block allocated from a Heap.

## PARAMS

*heap* **\[In\]**  Heap that block was allocated from.

*flags* **\[In\]**  **HEAP\_** *flags* from **"winnt.h"**.

*ptr* **\[In\]**  Block to get the size of.

## RETURNS

**Success:** The size of the block.

**Failure:** **-1**, *heap* or pointer are invalid.

## NOTES

The size may be bigger than what was passed to **[RtlAllocateHeap(3w)](/RtlAllocateHeap/3w.md)**.

## IMPLEMENTATION

Declared in **"winternl.h"**.

Implemented in **"dlls/ntdll/heap.c"**.

Debug channel **"heap"**.
