Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

memset(9) [suse man page]

MEMSET(9)						     Basic C Library Functions							 MEMSET(9)

NAME
memset - Fill a region of memory with the given value SYNOPSIS
void * memset(void * s, int c, size_t count); ARGUMENTS
s Pointer to the start of the area. c The byte to fill the area with count The size of the area. DESCRIPTION
Do not use memset to access IO space, use memset_io instead. COPYRIGHT
Kernel Hackers Manual 2.6. July 2010 MEMSET(9)

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