Problem shmat in HP-UX. EINVAL Error


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Problem shmat in HP-UX. EINVAL Error
# 8  
Old 08-03-2009
We load in memory oracle tables. To read the tables, they have associate several indexes. so we have several shared memory segment:
1..n Data Segment
1..n Indexex Segment (1xIndex)
1 Control Segment: To control de access of the table in memory.

One process can need read the same table with different index. (similar to SQL access). And so i need one instance (connection to data segment) for each different index access.

The index segment connection will be different, but the data segment will be the same. It was the problem.





, And these tables can be read by different indexes,
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Syntax Error Problem

Hi Below script is throwing an error: repos=root filename=/home/admin/Desktop/authz case $repos in root) root_folder="\" do sed "/$root_folder/a $username = $access" $filename done ;; esac exit 0 Error: ./new1.sh: line 77: syntax error near unexpected token `do' (1 Reply)
Discussion started by: ankur328
1 Replies

2. Shell Programming and Scripting

IF section problem. syntax error: unexpected end of file error

Hello, I have another problem with my script. Please accept my apologies, but I am really nooby in sh scripts. I am writing it for first time. My script: returned=`tail -50 SapLogs.log | grep -i "Error"` echo $returned if ; then echo "There is no errors in the logs" fi And after... (10 Replies)
Discussion started by: jedzio
10 Replies

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

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

5. Programming

request_irq always returns EINVAL

request_irq always returns EINVAL What am I doing wrong here ? int mydrvr_open(struct inode *inode, struct file *filp) { int ret; printk("<1> \nModule Opened!"); //disable_irq(4); //free_irq(4, NULL); ret = request_irq(4, &imr_interrupt_handler,IRQF_SHARED,... (0 Replies)
Discussion started by: dragonpoint
0 Replies

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

7. AIX

sharemem-f-shmat

Hi, I got this error from AIX 4.3.3/db2 7: * %SHAREMEM-F-SHMAT Error getting PUTPARM shared memory address , shmid=23029 * * 3630, errno=13 Anybody who know how to fix this? Thanks in advance, itik (1 Reply)
Discussion started by: itik
1 Replies

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

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

10. 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
Login or Register to Ask a Question
SHMAT(2)						      BSD System Calls Manual							  SHMAT(2)

NAME
shmat, shmdt -- attach or detach shared memory LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#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