---
name: "memeq"
section: "3"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/memeq"
---

# memeq(3)

memory equal

## NAME

memeq - memory equal

## LIBRARY

gnulib - The GNU Portability Library

## SYNOPSIS

```
#include <string.h>  // see memory.h(3head)
```

**bool memeq(const void \****m1***, const void \****m2***, size\_t** *n***);**

## DESCRIPTION

**memeq**() determines whether the first *n* bytes of the memory areas pointed to by *m1* and *m2* are equal.

## RETURN VALUE

**memeq**() returns true if and only if the first *n* bytes of the memory areas pointed to by *m1* and *m2* are equal.

## ATTRIBUTES

For an explanation of the terms used in this section, see [**attributes**(7)](/attributes/7.md).

| | | |
| --- | --- | --- |
| **Interface** | **Attribute** | **Value** |
| **memeq**() | Thread safety | MT-Safe |

## STANDARDS

GNU.

## HISTORY

gnulib 202601.

## SEE ALSO

[**string**(3)](/string/3.md)
