01-31-2006
low-level standard C library functions like memcpy and memset are almost always implemented as the most efficient possible manner fro the hardware. Some environments use libc when optimization is turned off for these modules. Check you compiler's man page. Turning optimation on forces the compiler/linker to load in the most efficient version in those environments.
As an example of this, HPUX has a millicode version of memset - a very fast implementation. It also has an entry point for a non-millicode memset in libc, _memset20
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
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
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
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
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
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
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
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
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
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
WMEMSET(3) Linux Programmer's Manual WMEMSET(3)
NAME
wmemset - fill an array of wide-characters with a constant wide character
SYNOPSIS
#include <wchar.h>
wchar_t *wmemset(wchar_t *wcs, wchar_t wc, size_t n);
DESCRIPTION
The wmemset() function is the wide-character equivalent of the memset(3) function. It fills the array of n wide-characters starting at wcs
with n copies of the wide character wc.
RETURN VALUE
wmemset() returns wcs.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
+----------+---------------+---------+
|Interface | Attribute | Value |
+----------+---------------+---------+
|wmemset() | Thread safety | MT-Safe |
+----------+---------------+---------+
CONFORMING TO
POSIX.1-2001, POSIX.1-2008, C99.
SEE ALSO
memset(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
2015-08-08 WMEMSET(3)