Sponsored Content
Top Forums Programming problem deallocating memory for 3d aray Post 27773 by Perderabo on Friday 6th of September 2002 01:01:44 PM
Old 09-06-2002
 

10 More Discussions You Might Find Interesting

1. Programming

Memory problem

Hi: I have a server with a very little memory leak (29 bytes) as reported by Purify. Itīs a pooled server, so each process lives forever accepting conections.But top or ps commands show that used memory it is always increasing much more than 29 bytes (30K mor or less) in each conection. How... (0 Replies)
Discussion started by: Pablo J. Royo
0 Replies

2. Programming

memory problem

Hi , One of java programs in our machine allocates 256M of heap memory and max of 512 memory(Tomcat to be specific). Our ulimit per process is 32M.How can a process allocates such a big amount of memory ps v output is PGIN SIZE RSS LIM TSIZ TRS %CPU %MEM COMMAND ... (0 Replies)
Discussion started by: ganti
0 Replies

3. Filesystems, Disks and Memory

memory Problem

Hi , One of java programs in our machine allocates 256M of heap memory and max of 512 memory(Tomcat to be specific). Our ulimit per process is 32M.How can a process allocates such a big amount of memory ps v output is PGIN SIZE RSS LIM TSIZ TRS %CPU %MEM COMMAND 24 220776 220892... (0 Replies)
Discussion started by: ganti
0 Replies

4. Programming

memory stack problem

Hi, I am writing a C program under SCO Unix. I have a memory stack problem but do not know how to go about fixing it. I have tried running INSURE but that does not detect any problems. Essentially the problem is that the memory address shifts on return from a routine. I pass a pointer to... (3 Replies)
Discussion started by: jkeagy
3 Replies

5. Programming

how to round up a memory address(memory alignment problem)

Hi, I try to marshal a unsigned int and a char * into a buffer, and then unmarshal them later to get them out. I need to put the char * in the front and unsigned int at the end of the buffer. However, my system always give me "BUS ERROR". I am using Sun Sparcs Sloris 2.10. My code to marshal... (6 Replies)
Discussion started by: nj302
6 Replies

6. Solaris

out of memory problem

i am building open source software on a solaris 8 machine for couple of days i am getting error messages like out of memory or no more processes and then build is failing i tried with rebooting the machine but then after couple of days same problem is arising again. can any one... (1 Reply)
Discussion started by: mobydick
1 Replies

7. Programming

memory leak problem

hi all Can any one plz explain me about memory leak problem Thankx (5 Replies)
Discussion started by: sonali
5 Replies

8. Red Hat

1Gb+ memory problem

Hi, I have a Linux distribution ( Oralce Enterprise Linux 5.3 i.e. Redhat ) that I have installed. It works fine when I used 2*512Mb dimms or replace them with a single 1Gb dimm. However when I try to go above 1 Gb the bootup and general performance deteriorates badly. The BIOS picks up the memory... (3 Replies)
Discussion started by: jimthompson
3 Replies

9. Programming

fortran: segmentation fault when deallocating

Hi, I'm looking for a quite "interesting" bug at the moment - any idea could help! (o; Language is fortran 90, compiler gfortran (sry, dont find which version it is). As I suppose you dont want to read like 10k lines of code here, I won't post the entire thing ^^ The problem is that I get... (3 Replies)
Discussion started by: Giogio
3 Replies

10. Programming

Deallocating memory in multi-threaded environment.

I'm having a hard time figuring out how to manage deallocation of memory in multithreaded environments. Specifically what I'm having a hard time with is using a lock to protect a structure, but when it's time to free the structure, you have to unlock the lock to destroy the lock itself. Which will... (5 Replies)
Discussion started by: gngrwzrd
5 Replies
SHMGET(2)						      BSD System Calls Manual							 SHMGET(2)

NAME
shmget -- get shared memory area identifier SYNOPSIS
#include <sys/types.h> #include <sys/ipc.h> #include <sys/shm.h> int shmget(key_t key, int size, int shmflg); DESCRIPTION
shmget() returns the shared memory identifier associated with the key key. A shared memory segment is created if either key is equal to IPC_PRIVATE, or key does not have a shared memory segment identifier associated with it, and the IPC_CREAT bit is set in shmflg. If a new shared memory segment is created, the data structure associated with it (the shmid_ds structure, see shmctl(2)) is initialized as follows: o shm_perm.cuid and shm_perm.uid are set to the effective uid of the calling process. o shm_perm.gid and shm_perm.cgid are set to the effective gid of the calling process. o shm_perm.mode is set to the lower 9 bits of shmflg. o shm_lpid, shm_nattch, shm_atime, and shm_dtime are set to 0 o shm_ctime is set to the current time. o shm_segsz is set to the value of size. RETURN VALUES
Upon successful completion a positive shared memory segment identifier is returned. Otherwise, -1 is returned and the global variable errno is set to indicate the error. ERRORS
[EACESS] A shared memory segment is already associated with key and the caller has no permission to access it. [EEXIST] Both IPC_CREAT and IPC_EXCL are set in shmflg, and a shared memory segment is already associated with key. [ENOSPC] A new shared memory indentifier could not be created because the system limit for the number of shared memory identifiers has been reached. [ENOENT] IPC_CREAT was not set in shmflg and no shared memory segment associated with key was found. [ENOMEM] There is not enough memory left to created a shared memory segment of the requested size. SEE ALSO
shmctl(2), shmat(2), shmdt(2) BSD
August 17, 1995 BSD
All times are GMT -4. The time now is 04:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy