memset

OS/161 Reference Manual

Name

memset - initialize region of memory

Library

Standard C Library (libc, -lc)

Synopsis

#include <string.h>

void *
memset(void *buf, int chr, size_t len);

Description

The memory region pointed to by buf, of length len, is initialized by setting each location of it to chr (converted to unsigned char).

Beware of writing

   memset(buf, len, 0);
(which does nothing at all) when you meant
   memset(buf, 0, len);
instead.

Return Values

memset returns buf.