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

# RtlAllocateHeap(3w)

## NAME

**RtlAllocateHeap** (NTDLL.@)

## SYNOPSIS

PVOID RtlAllocateHeap\
  (\
   HANDLE *heap*,\
   ULONG  *flags*,\
   SIZE\_T *size*\
  )

## DESCRIPTION

Allocate a memory block from a Heap.

## PARAMS

*heap* **\[In\]**  Heap to allocate block from.

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

*size* **\[In\]**  Size of the memory block to allocate.

## RETURNS

**Success:** A pointer to the newly allocated block

**Failure:** **NULL**.

## NOTES

This call does not **[SetLastError(3w)](/SetLastError/3w.md)**.

## IMPLEMENTATION

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

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

Debug channel **"heap"**.
