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

# RtlCompactHeap(3w)

## NAME

**RtlCompactHeap** (NTDLL.@)

## SYNOPSIS

ULONG RtlCompactHeap\
  (\
   HANDLE *heap*,\
   ULONG  *flags*\
  )

## DESCRIPTION

Compact the free space in a Heap.

## PARAMS

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

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

## RETURNS

The number of bytes compacted.

## NOTES

This function is a harmless stub.

## IMPLEMENTATION

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

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

Debug channel **"heap"**.
