---
name: "lock_sample"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/lock_sample/3alleg4"
---

# lock\_sample(3alleg4)

Locks all the memory used by a sample. Allegro game programming library.

## NAME

lock\_sample - Locks all the memory used by a sample. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**void lock\_sample(SAMPLE \*spl);**

## DESCRIPTION

Under DOS, locks all the memory used by a sample. You don't normally need  to call this function because load\_sample() and create\_sample() do it for you.

## SEE ALSO

**load\_sample**(3alleg4), **create\_sample**(3alleg4)
