# shz_memcpy1

Source: https://sh4zam.com/api/memory/shz_memcpy1/

```c
SHZ_INLINE void* shz_memcpy1( void* SHZ_RESTRICT dst, const void* SHZ_RESTRICT src, size_t bytes) SHZ_NOEXCEPT;
```

Copies an unaligned buffer to another one byte at a time.

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `dst` | `void *SHZ_RESTRICT` |  |
| `src` | `const void *SHZ_RESTRICT` |  |
| `bytes` | `size_t` |  |

## Returns

`void *`

## Details

The `dst` pointer is returned.

## Notes

- Typically, unless you know you are copying a tiny number of definitely unaligned bytes, you want to use `shz_memcpy()`, which automatically handles arbitrary alignment for you, potentially more efficiently than copying byte-by-byte.

## Warnings

- `dst` and `src` buffers should not be overlapping.

## Availability

- **C++ equivalent:** [`shz::memcpy1`](https://sh4zam.com/api/cpp/#shzmemcpy1)
- **Type-generic form:** none
- **Back-ends:** SH4: dedicated SH4 implementation · SW: portable C · SPU: shared C implementation
- **Defined in:** [`sh4zam/shz_mem.h:114`](https://github.com/gyrovorbis/sh4zam/blob/ba1e30c88d49df0311870b229e1dd860ef26c477/include/sh4zam/shz_mem.h#L114)
- **Module:** [Memory](https://sh4zam.com/api/memory/), section "Specializations"

## See also

[`shz_memcpy`](https://sh4zam.com/api/memory/shz_memcpy/)
