11-20-2008
You can memcpy them - integers are stored in binary format, not as textual digits.
To read it back out, you have to know the exact format of what was written to start with.
IF you don't like that use sprintf() then memcpy();
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I am running HP-UX B.11.11.
I'm increasing a parameter for a database engine so that it uses more memory to buffer the disk drive (to speed up performance). I have over 5GB of memory not being used.
But when I try to start the DB with the increased buffer parameter I get told.
"Not... (1 Reply)
Discussion started by: cjcamaro
1 Replies
2. HP-UX
Hello....
AIX has a limit of 11 shared memory segments per process, does any one know how many HP have?? If so how do I find that out??
Thanks in advance...... (2 Replies)
Discussion started by: catwomen
2 Replies
3. Programming
I need to create a shared library to access an in memory DB. The DB is not huge, but big enough to make it cumbersome to carry around in every single process using the shared library. Luckily, it is pretty static information, so I don't need to worry much about synchronizing the data between... (12 Replies)
Discussion started by: DreamWarrior
12 Replies
4. HP-UX
I am fairly new to HP-UX and trying to get a better understanding of the operating system. While poking around a bit I find myself questioning whether I should be concerned about Shared Memory segments with missing CPID and LPID? For example:
ipcs -mp
IPC status from /dev/kmem as of Mon Mar... (2 Replies)
Discussion started by: scotbuff
2 Replies
5. Programming
I am looking for C program source code. Could you please help me in finding the source code required mentioned below.
program to create multiple threads (one master thread and rest worker threads) and using the threads write into and read from shared memory
Restrictions:
Only one thread... (2 Replies)
Discussion started by: kumars
2 Replies
6. Programming
I am writing a shared library in Linux (but compatible with other UNIXes) and I want to allow multiple instances to share a piece of memory -- 1 byte is enough. What's the "best" way to do this? I want to optimize for speed and portability.
Obviously, I'll have to worry about mutual exclusion. (0 Replies)
Discussion started by: otheus
0 Replies
7. Programming
Can someone tell me how many bytes are allocated for C segments(text,data,heap,stack). (3 Replies)
Discussion started by: nandumishra
3 Replies
8. Programming
I created a shared memory and attached it. I also created the appropriate semaphores to sync. my read/write operations. However I do not know how am I supposed to do so. Anyone has got any ideas? I want to write int the form of 1234:23:444:... where each number between : means something to the... (0 Replies)
Discussion started by: tyron
0 Replies
9. UNIX for Dummies Questions & Answers
I have created and attached a shared memory segment. However I do not know how am I supposed to write and read data from it. I want to save various different data on this segment such as process IDs and other. Do you know how am I supposed to write these and be able to read such data in the correct... (1 Reply)
Discussion started by: tyron
1 Replies
10. Programming
Hello.
I am new to this forum and I would like to ask for advice about low level POSIX programming.
I have to implement a POSIX compliant C shared library.
A file will have some variables and the shared library will have some functions which need those variables.
There is one special... (5 Replies)
Discussion started by: iamjag
5 Replies
BCOPY(3) Linux Programmer's Manual BCOPY(3)
NAME
bcopy - copy byte sequence
SYNOPSIS
#include <strings.h>
void bcopy(const void *src, void *dest, size_t n);
DESCRIPTION
The bcopy() function copies n bytes from src to dest. The result is correct, even when both areas overlap.
RETURN VALUE
None.
CONFORMING TO
4.3BSD. This function is deprecated (marked as LEGACY in POSIX.1-2001): use memcpy(3) or memmove(3) in new programs. Note that the first
two arguments are interchanged for memcpy(3) and memmove(3). POSIX.1-2008 removes the specification of bcopy().
SEE ALSO
memccpy(3), memcpy(3), memmove(3), strcpy(3), strncpy(3)
COLOPHON
This page is part of release 3.53 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/.
Linux 2009-03-15 BCOPY(3)