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

# RtlFreeHeap(3w)

## NAME

**RtlFreeHeap** (NTDLL.@)

## SYNOPSIS

BOOLEAN RtlFreeHeap\
  (\
   HANDLE *heap*,\
   ULONG  *flags*,\
   PVOID  *ptr*\
  )

## DESCRIPTION

Free a memory block allocated with **[RtlAllocateHeap(3w)](/RtlAllocateHeap/3w.md)**.

## PARAMS

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

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

*ptr* **\[In\]**  Block to free.

## RETURNS

**Success:** **TRUE**, if pointer is **NULL** or was freed successfully.

**Failure:** **FALSE**.

## IMPLEMENTATION

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

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

Debug channel **"heap"**.
