Sponsored Content
Full Discussion: sharemem-f-shmat
Operating Systems AIX sharemem-f-shmat Post 302171624 by bakunin on Friday 29th of February 2008 03:30:24 AM
Old 02-29-2008
It is a shared-memory error. Use "ipcrm" to clear the shared-memory-segments used by db/2 after stopping db/2. Restart the application then. If it happens again i suggest you upgrade to a db/2-version (and AIX version) less ancient.

bakunin
 

7 More Discussions You Might Find Interesting

1. HP-UX

shmat() permission denied, what's this?

I have installed an application that runs correctly for root but not other users. The application generates an error that indicates users don't have permission to attach to shared memory. A daemon process creates the shared memory segment. I've checked every permission I can think of but nothing... (2 Replies)
Discussion started by: km4hr
2 Replies

2. Programming

shmat problem

The first shmat in my program cannot fetch the start address of the shared memory. #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <sys/ipc.h> #include <sys/shm.h> int main(int argc,char *argv) { int pid; key_t mykey; int shmid; long *shm; long *shm2; ... (3 Replies)
Discussion started by: yong
3 Replies

3. Linux

shmat() Failure While Using a Large Amount of Shared Memory

Hi, I'm developing a data processing pipeline with multiple stages, with data being moved between the stages using shared memory segments. The size of the data is typically of the order of hundreds of megabytes, and there are typically a few tens of main shared memory segments each of size... (2 Replies)
Discussion started by: theicarusagenda
2 Replies

4. UNIX for Advanced & Expert Users

Problem shmat in HP-UX. EINVAL Error

I have a process that need two active connections to the same zone of shared memory. But when i do the second call to shmat it give me error 22 (EINVAL). Only works ok the second call to shmat if i disconnect the first connection (shmdt) In Sun,AIX and Digital, i donīt have this problem. ... (7 Replies)
Discussion started by: dairby
7 Replies

5. Programming

Problem shmat in HP-UX Titanium ia64. EINVAL Error

I have a process that needs two active connections to the same zone of shared memory simultaneously. The firs conection works ok, but when i do the second call to shmat it give me error 22 (EINVAL). Only works ok the second call to shmat if i disconnect the first connection (shmdt) Steps:... (3 Replies)
Discussion started by: dairby
3 Replies

6. Programming

shmat() with fixed address

Hi, I'm using Ubuntu 10.04 on a 64bit machine. In my shmat() call, I want to assign fixed memory address to shmaddr variable. I have no idea which address value to give. Some where in the net I read we can make use of sysproc info to know the user space addresses, but could not figure out how... (1 Reply)
Discussion started by: sajjar
1 Replies

7. SuSE

shmat failed due to Cannot allocate memory

Hi, My program was running for a whole night. after 12 hours i got an error message "Cannot allocate memory" during the shmat commmand. So can you please let me know what could be the reason? is there any solution? thanks in advance. Regards, Mano (5 Replies)
Discussion started by: ManoharanMani
5 Replies
SHMAT(2)						      BSD System Calls Manual							  SHMAT(2)

NAME
shmat, shmdt -- attach or detach shared memory LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <machine/param.h> #include <sys/types.h> #include <sys/ipc.h> #include <sys/shm.h> void * shmat(int shmid, const void *addr, int flag); int shmdt(const void *addr); DESCRIPTION
The shmat() system call attaches the shared memory segment identified by shmid to the calling process's address space. The address where the segment is attached is determined as follows: o If addr is 0, the segment is attached at an address selected by the kernel. o If addr is nonzero and SHM_RND is not specified in flag, the segment is attached the specified address. o If addr is specified and SHM_RND is specified, addr is rounded down to the nearest multiple of SHMLBA. The shmdt() system call detaches the shared memory segment at the address specified by addr from the calling process's address space. RETURN VALUES
Upon success, shmat() returns the address where the segment is attached; otherwise, -1 is returned and errno is set to indicate the error. The shmdt() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error. ERRORS
The shmat() system call will fail if: [EINVAL] No shared memory segment was found corresponding to shmid. [EINVAL] The addr argument was not an acceptable address. The shmdt() system call will fail if: [EINVAL] The addr argument does not point to a shared memory segment. SEE ALSO
shmctl(2), shmget(2) BSD
August 2, 1995 BSD
All times are GMT -4. The time now is 04:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy