Sponsored Content
Full Discussion: Problem with memcpy
Top Forums Programming Problem with memcpy Post 302209960 by arunkumar_mca on Sunday 29th of June 2008 12:54:40 PM
Old 06-29-2008
Thanks jim ..

i tried this , it is showing access vilolation error at the memcpy line . I tried with debugging . I can able to find the error only at memcpy line . Can you please help me to correct this.

It is compiling , but the error is comming at runtime

Thanks,
Arun
 

10 More Discussions You Might Find Interesting

1. Programming

memcpy segfaults, but not in windows

Hi Having a lil trouble with a rather simple application I'm writing. It so happens that I have to copy some data using memcpy() and so far I've been doing just fine compiling it with VC.Net and running it on Windows XP. Now I'm trying to port the thing to Solaris (which shouldn't really be too... (3 Replies)
Discussion started by: khoma
3 Replies

2. Shell Programming and Scripting

problem with dd command or maybe AFS problem

Hi, folks. Sorry for bothering, but maybe someone could help me please. The problem is the following: there is some script that copies files from local file system to AFS. The copying is performed with dd command. The script copies data into some AFS volumes. The problem appeared with one... (0 Replies)
Discussion started by: Anta
0 Replies

3. Shell Programming and Scripting

ssh script problem problem

Hi Please help me with the following problem with my script. The following block of code is not repeating in the while loop and exiting after searching for first message. input_file ========== host001-01 host001-02 2008-07-23 13:02:04,651 ConnectionFactory - Setting session state... (2 Replies)
Discussion started by: pcjandyala
2 Replies

4. AIX

user login problem & Files listing problem.

1) when user login to the server the session got colosed. How will resolve? 2) While firing the command ls -l we are not able to see the any files in the director. but over all view the file system using the command df -g it is showing 91% used. what will be the problem? Thanks in advance. (1 Reply)
Discussion started by: pernasivam
1 Replies

5. UNIX for Dummies Questions & Answers

DHCP problem and eth1 problem

At work I am trying to get this one Linux machine (let's call it ctesgm07) to behave like another Linux machine that we have (let's call it test007). test007 returns the following version info: cat /etc/debian_version: lenny/sid uname -a: Linux test007 2.6.27-7-generic #1 SMP Tue Nov 4... (0 Replies)
Discussion started by: sllinux
0 Replies

6. Programming

Segmentation Fault by memcpy

Hello everybody, I'm coding a test program for ARP protocol, and i don't know why i'm getting a SIGSEGV, i traced it with gdb and it says it's due to the memcpy function from /lib/libc.so.6. Program received signal SIGSEGV, Segmentation fault. 0xb7e9e327 in memcpy () from /lib/libc.so.6 This... (5 Replies)
Discussion started by: Zykl0n-B
5 Replies

7. IP Networking

Problem with forwarding emails (SPF problem)

Hi, This is rather a question from a "user" than from a sys admin, but I think this forum is apropriate for the question. I have an adress with automatic email forwarding and for some senders (two hietherto), emails are bouncing. This has really created a lot of problems those two time so I... (0 Replies)
Discussion started by: carwe
0 Replies

8. Programming

memcpy error

I am getting segmentation fault in memcpy.I have given sufficient memory but i dont know why it is occurring char *finalptr = ( char *)malloc(1048576* sizeof(char)); finaloffset=0;have=685516; memcpy(&(finalptr)+finaloffset,out,have); finaloffset=685516;have=359910;... (23 Replies)
Discussion started by: rajsekhar28
23 Replies

9. Shell Programming and Scripting

Undefined reference to memcpy@GLIBC_2.14

Dear All, I am trying to compile OpenFOAM-1.7.x in RHEL. I could not able to compile some of the applications because of libc version issues. It is saying undefined reference to memcpy@GLIBC_2.14 Can anybody look into it? Thanks & Regards, linuxUser_ (3 Replies)
Discussion started by: linuxUser_
3 Replies

10. UNIX for Dummies Questions & Answers

sed Or Grep Problem OR Terminal Problem?

I don't know if you guys get this problem sometimes at Terminal but I had been having this problem since yesterday :( Maybe I overdid the Terminal. Even the codes that used to work doesn't work anymore. Here is what 's happening: * I wanted to remove lines containing digits so I used this... (25 Replies)
Discussion started by: Nexeu
25 Replies
MEMORY(2)							System Calls Manual							 MEMORY(2)

NAME
memccpy, memchr, memcmp, memcpy, memmove, memset - memory operations SYNOPSIS
#include <u.h> #include <libc.h> void* memccpy(void *s1, void *s2, int c, long n) void* memchr(void *s, int c, long n) int memcmp(void *s1, void *s2, long n) void* memcpy(void *s1, void *s2, long n) void* memmove(void *s1, void *s2, long n) void* memset(void *s, int c, long n) DESCRIPTION
These functions operate efficiently on memory areas (arrays of bytes bounded by a count, not terminated by a zero byte). They do not check for the overflow of any receiving memory area. Memccpy copies bytes from memory area s2 into s1, stopping after the first occurrence of byte c has been copied, or after n bytes have been copied, whichever comes first. It returns a pointer to the byte after the copy of c in s1, or zero if c was not found in the first n bytes of s2. Memchr returns a pointer to the first occurrence of byte c in the first n bytes of memory area s, or zero if c does not occur. Memcmp compares its arguments, looking at the first n bytes only, and returns an integer less than, equal to, or greater than 0, according as s1 is lexicographically less than, equal to, or greater than s2. The comparison is bytewise unsigned. Memcpy copies n bytes from memory area s2 to s1. It returns s1. Memmove works like memcpy, except that it is guaranteed to work if s1 and s2 overlap. Memset sets the first n bytes in memory area s to the value of byte c. It returns s. SOURCE
All these routines have portable C implementations in /sys/src/libc/port. Most also have machine-dependent assembly language implementa- tions in /sys/src/libc/$objtype. SEE ALSO
strcat(2) BUGS
ANSI C does not require memcpy to handle overlapping source and destination; on Plan 9, it does, so memmove and memcpy behave identically. If memcpy and memmove are handed a negative count, they abort. MEMORY(2)
All times are GMT -4. The time now is 07:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy