Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

memset(3) [linux man page]

MEMSET(3)						     Linux Programmer's Manual							 MEMSET(3)

NAME
memset - fill memory with a constant byte SYNOPSIS
#include <string.h> void *memset(void *s, int c, size_t n); DESCRIPTION
The memset() function fills the first n bytes of the memory area pointed to by s with the constant byte c. RETURN VALUE
The memset() function returns a pointer to the memory area s. CONFORMING TO
SVr4, 4.3BSD, C89, C99, POSIX.1-2001. SEE ALSO
bzero(3), swab(3), wmemset(3) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. GNU
1993-04-11 MEMSET(3)

Check Out this Related Man Page

MEMSET(3)                                                    Linux Programmer's Manual                                                   MEMSET(3)

NAME
memset - fill memory with a constant byte SYNOPSIS
#include <string.h> void *memset(void *s, int c, size_t n); DESCRIPTION
The memset() function fills the first n bytes of the memory area pointed to by s with the constant byte c. RETURN VALUE
The memset() function returns a pointer to the memory area s. ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7). +----------+---------------+---------+ |Interface | Attribute | Value | +----------+---------------+---------+ |memset() | Thread safety | MT-Safe | +----------+---------------+---------+ CONFORMING TO
POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD. SEE ALSO
bstring(3), bzero(3), swab(3), wmemset(3) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. GNU 2017-03-13 MEMSET(3)
Man Page

6 More Discussions You Might Find Interesting

1. Programming

about memset fuction

Dear all, In my code,i am planning to use memset function to re-initialise an array before populating it everytime. Will using memset function be an overload to the program? (3 Replies)
Discussion started by: ranj@chn
3 Replies

2. UNIX for Dummies Questions & Answers

questions in memset

HI all , please find the piece of code below char *t; char *f; char buf; memset(buf,0,50); after that i am assigning memory for (i=0; i<100; i++) { t = buf+(i*6); f = "ARUN"; } my question .. 1) i have run this it is... (7 Replies)
Discussion started by: arunkumar_mca
7 Replies

3. UNIX for Advanced & Expert Users

memset vs calloc

Dear Friends, Can any one tell me the difference between memset and calloc function in C. Regards, Selvi (7 Replies)
Discussion started by: salvi
7 Replies

4. Solaris

application Crashes on memset ?? any suggestions

Hi All, we have an application that is written in 'C' programming to connects to various servers in the organization. The bellow code establish a TCP connection to connect to the remote servers. the application works perfectly ok, but, after some time the entire process get's crashed and... (2 Replies)
Discussion started by: sudharma
2 Replies

5. Programming

C bzero() to memset() issue

Hi guys, my tool works fine in gentoo, ubuntu now im trying to port it to windows but bzero/bcopy I read aren't working on windows and for better portability I should of use memset() so im trying to translate bzero(buffer,256);in printf("MAIL TO"); strcpy(buffer, rcp); ... (4 Replies)
Discussion started by: Jess83
4 Replies

6. Emergency UNIX and Linux Support

Memset fails on Solaris

Hi, memset call is failing on solaris for me. I wrote below code and that also fails. Any hints? void *memset(void *dst, int c, size_t n) { if (n) { char *d = dst; do { *d++ = c; } while (--n); } return dst; } (2 Replies)
Discussion started by: skyineyes
2 Replies