Sponsored Content
Operating Systems Linux shmget failed - cannot allocate memory Post 302487598 by citaylor on Thursday 13th of January 2011 02:49:57 AM
Old 01-13-2011
yes, you are out of memory - before:
Mem: 4055852k total, 3980588k used, Swap: 4200444k total, 3580824k used, 619620k free
after:
Mem: 4055852k total, 4025864k used, Swap: 4200444k total, 4200408k used, 36k free
I would say yes, you have a memory leak, or somewhere there is a bug in your program and it is allocating too much memory.
(Although you dont seem to have a massive amount of memory available in the "before" "top")
 

10 More Discussions You Might Find Interesting

1. Programming

how allocate virtual memory

Hi Folks can any body suggest how to allocate virtual memory any function for that (2 Replies)
Discussion started by: munnu
2 Replies

2. UNIX for Advanced & Expert Users

unable to allocate enough memory

On SunOS 5.8 I get an error when starting a large Java process with over 2Gb memory. Error occurred during initialization of VM Could not reserve enough space for object heap When stopping several other Java processes we can start this process. This seems to indicate that we don't have... (11 Replies)
Discussion started by: rein
11 Replies

3. UNIX for Advanced & Expert Users

How to allocate memory

Hi, I have 2 systems with same hardware and software. One system is giving me error "Error occurred during initialization of VM Could not reserve enough space for object " when I tried to increase JBoss App's heap size to 2GB while the other system is running fine without any issue. Is there... (5 Replies)
Discussion started by: ravi3553
5 Replies

4. UNIX for Advanced & Expert Users

Oracle how many memory allocate really

hi... i want to find oracle allocate how many memory really.. i execute this code to list memory on unix system : ps -eo pmem,args | sort -k 1 -r -n outputs ; %mem command 12.9|ora_smon_RTX 12.9|ora_s000_RTX 12.9|ora_reco_RTX 12.9|ora_qmnc_RTX... (2 Replies)
Discussion started by: utoptas
2 Replies

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

6. SuSE

shmget failed - cannot allocate memory

Hi, In my proj, one process was running for 2 days. after 2 days its throwing an error message "shmget failed cannot allocate memory". the same problem happened every time.i.e. i can reproduce the same issue if my process is running for every 2 days for a same operation.Within this 2 days there... (1 Reply)
Discussion started by: ManoharanMani
1 Replies

7. Linux

shmget failed - cannot allocate memory

Hi, In my proj, one process was running for 2 days. after 2 days its throwing an error message "shmget failed cannot allocate memory". the same problem happened every time.i.e. i can reproduce the same issue if my process is running for every 2 days for a same operation.Within this 2 days there... (1 Reply)
Discussion started by: ManoharanMani
1 Replies

8. Programming

How to allocate memory to a string in C?

hi I want to take string as a input from user and the string is very very length. From the lengthy string i have to substring take first 16 letters, then next 8 letters,................... Please guide me how to write program to take lengthy string from user and sub string it. Thanks (4 Replies)
Discussion started by: atharalikhan
4 Replies

9. Solaris

unable to allocate enough memory

On SunOS 10 get an error when starting a large Java process with over 2Gb memory. Error occurred during initialization of VM Could not reserve enough space for object heap i have 32G memory !! , swap = 31G Please any advice !!! (3 Replies)
Discussion started by: moata_u
3 Replies

10. Programming

calloc fails: 'Cannot allocate memory'

Hi , experts. I work on Linux station (RedHat 5.7), regular user, but have root password. %> uname -a Linux ran1log06 2.6.18-238.1.1.el5 #1 SMP Tue Jan 4 13:32:19 EST 2011 x86_64 x86_64 x86_64 GNU/Linux %> cat /etc/issue Red Hat Enterprise Linux Client release 5.7 (Tikanga) Kernel \r on... (5 Replies)
Discussion started by: baruchgu
5 Replies
shmid_ds(4)						     Kernel Interfaces Manual						       shmid_ds(4)

NAME
shmid_ds - Defines a shared memory region SYNOPSIS
#include <sys/shm.h> struct shmid_ds{ struct ipc_perm shm_perm; int shm_segsz; u_short shm_lpid; u_short shm_cpid; u_short shm_nattch; time_t shm_atime; time_t shm_dtime; time_t shm_ctime; }; DESCRIPTION
The shmid_ds structure defines a shared memory region associated with a shared memory region ID. There is one shared memory region per ID. Collectively, the shared memory regions are maintained in a shared memory table, with the shared memory region IDs identifying the entries in the table. The IPC permissions for the shared memory regions are implemented in a separate, but associated, ipc_perm structure. A shared memory region is created indirectly via the shmget() call. If shmget() is called with a non-existent shared memory region ID, the kernel allocates a new shmid_ds structure, initializes it, and returns the ID that is to be associated with the region. The kernel allocates actual memory of shm_segsz bytes only when a process attaches a region to its address space. Attached regions are maintained in a separate region table. The entries in the shared memory table point to the associated attached regions in the region ta- ble. The same shared memory region can be attached multiple times, by the same or different processes. Each attachment of the region cre- ates a new entry in the region table. After a process attaches a shared memory region, the region becomes part of the process's virtual address space. Processes access shared memory regions by using the same machine instructions used to access any virtual address. FIELDS
The ipc_perm structure that defines permissions for shared memory operations. See NOTES. The size of the shared memory region, in bytes. The process ID of the process that created the shared memory region ID. The process ID of the last process that performed a shmat() or shmdt() operation on the shared memory region. The number of processes that currently have this region attached. The time of the last shmat() operation. The time of the last shmdt() operation. The time of the last shmctl() operation that changed a member of the shmid_ds structure. NOTES
The shm_perm field identifies the associated ipc_perm structure that defines the permissions for operations on the shared memory region. The ipc_perm structure (from the sys/ipc.h header file) is shown here. struct ipc_perm { ushort uid; /* owner's user id */ ushort gid; /* owner's group id */ ushort cuid; /* creator's user id */ ushort cgid; /* creator's group id */ ushort mode; /* access modes */ ushort seq; /* slot usage sequence number */ key_t key; /* key */ }; The mode field is a nine-bit field that contains the permissions for shared memory operations. The first three bits identify owner permis- sions; the second three bits identify group permissions; and the last three bits identify other permissions. In each group, the first bit indicates read permission; the second bit indicates write permission; and the third bit is not used. RELATED INFORMATION
Functions: shmat(2), shmdt(2), shmctl(2), shmget(2) delim off shmid_ds(4)
All times are GMT -4. The time now is 01:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy