---
name: "AllocMappedBuffer"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.0.1-3.1"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/AllocMappedBuffer"
---

# AllocMappedBuffer(3w)

## NAME

**AllocMappedBuffer** (KERNEL32.38)

## SYNOPSIS

void AllocMappedBuffer\
  (\
   CONTEXT86\* *context*\
  )

## PARAMS

**\[In\]**  **EDI** register: size of buffer to allocate.

## DESCRIPTION

This is an undocumented **KERNEL32** function that SMapLS's a GlobalAlloc'ed buffer.

## RETURNS

**EDI** register: pointer to buffer.

## NOTES

The buffer is preceded by **8** bytes: .**..** edi+**0** buffer edi-**4** **SEGPTR** to buffer edi-**8** some magic Win95 needs for SUnMapLS (we use it for the memory handle).

The **SEGPTR** is used by the caller!

## IMPLEMENTATION

Exported by ordinal only. Use **[GetProcAddress(3w)](/GetProcAddress/3w.md)** to obtain a pointer to the function.

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

Available on x86 platforms only.

This function passes one or more arguments in registers.  For more details, please read the source code.

Debug channel **"heap"**.
