Sponsored Content
Full Discussion: about memset fuction
Top Forums Programming about memset fuction Post 97351 by Perderabo on Sunday 29th of January 2006 10:28:28 AM
Old 01-29-2006
memset is usually the most efficient way to initialize an data area. It should not contribute very much to the load.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Get Oracle fuction return value in a variable

Hi All, :confused: I have the following code. var=' ' sqlplus user/pass@DB <<EOF whenever sqlerror exit 1 select package.func() into $var from dual; EOF echo $var But, this code does not work to display the value returned by the oracle function. Do we have to bind variables before... (3 Replies)
Discussion started by: rahulrathod
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

awk and fuction (recursion) !! Urgent !!

Hey all, :D Could you please check following way of writing awk is correct or not ??? ----------------------------------------------------------- ----------------------------------------------------------------- Its recursion being called. tempgrep.txt has : 462948 1311040 880922... (12 Replies)
Discussion started by: varungupta
12 Replies

4. Shell Programming and Scripting

fuction return in perl

Hi All, I have a perl script(1.pl) that calls a c function defined in another file sample.c #!/usr/bin/perl my $re = 1; my @s = `/home/PERL_SCRIPTING/Rough/sample pline $re 10`; print "$_" foreach(@s); The sample.c is as bwlow: # include <stdio.h> int pline(int, int);... (4 Replies)
Discussion started by: jisha
4 Replies

5. 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

6. Shell Programming and Scripting

Perl system fuction with

Hi, I've written a perl script with a nested foreach statement in it. I have the line code: foreach $argn(@arguments) { foreach $location (@path) { system("find $location -name \"$argn\" -print >> results.txt"); ... (2 Replies)
Discussion started by: tchoruma
2 Replies

7. 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

8. 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

9. Shell Programming and Scripting

UNIX date fuction - how to deduct days from today's date

Hi, One of my Unix scripts needs to look for files coming in on Fridays. This script runs on Mondays. $date +"%y%m%d" will give me today's date. How can I get previous Friday's date.. can I do "today's date minus 3 days" to get Friday's date? If not, then any other way?? Name of the files is... (4 Replies)
Discussion started by: juzz4fun
4 Replies

10. 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
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)
All times are GMT -4. The time now is 04:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy