---
name: "SDL_memset4"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_memset4"
---

# SDL\_memset4(3)

Initialize all 32-bit words of buffer of memory to a specific value.

## NAME

SDL\_memset4 - Initialize all 32-bit words of buffer of memory to a specific value.

## HEADER FILE

Defined in SDL3/SDL\_stdinc.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**void \* SDL\_memset4(void \*dst, Uint32 val, size\_t dwords);**

## DESCRIPTION

This function will set a buffer of **dwords** **Uint32**\
  values, pointed to by **dst** , to the value specified in **val** .

Unlike  **SDL\_memset** , this sets 32-bit values, not bytes, so it's not limited to a range of 0-255.

## FUNCTION PARAMETERS

- *dst*

  the destination memory region. Must not be NULL.

- *val*

  the  **Uint32**\
    value to set.

- *dwords*

  the number of  **Uint32**\
    values to set in **dst** .

## RETURN VALUE

Returns **dst** .

## THREAD SAFETY

It is safe to call this function from any thread.

## AVAILABILITY

This function is available since SDL 3.2.0.
