04-30-2007
Available virtual memory = RAM + swapfile - (currently in use)
So, if the total is 3GB + (probably) 6GB swap, you have nine GB to use. The total memory for a process is kernel space + user space. What version of unix do you have?
For example, free gives you this information on Linux boxes.
Generally, processes that use huge amounts of memory will cause the system to bog because of all the extra paging activity involved. If this is a multiuser system, you might want to ask first. And check ulimit for your account, also.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hello,
I have 2 or more environment files, with identical variable names; see below:
.env_file1
export PROJNAME="XYZ"
export PROJID="2"
.env_file2
export PROJNAME="WSX"
export PROJID="9"
.env_file(n)
export PROJNAME="QAZ"
export PROJID="12"
The env files above will be sourced... (2 Replies)
Discussion started by: Nomaad
2 Replies
2. Linux
How can i Globally set the maximum core memory a single process can take. IE, i want to set that no single process may get more than 11GB.
I am running red hat enterprise unix 4. (9 Replies)
Discussion started by: frankkahle
9 Replies
3. UNIX for Advanced & Expert Users
Hello! I was wondering if I could trouble all your experts with a couple questions regarding checking memory usage changes during the run time in the specific program (process) under UNIX.
1. After the program starts running, is ps the best way to tell the total memory usage at the any time?
... (2 Replies)
Discussion started by: aginger
2 Replies
4. Programming
Hi,
I'm currently working on a project to help the analysis of malware from inside the kernel to avoid any kind of detection.
So I need to be able to read the process memory from my kernel module.
As of now, I'm stuck at converting a virtual memory address (for example 0x080483e8 found... (3 Replies)
Discussion started by: anonymoose
3 Replies
5. Red Hat
Dear Friends ,
I am confused about shared memory in Linux . plz look @ the below output :
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 126G 61G 59G 52% /
tmpfs 1.7G 0 1.7G 0% /dev/shm
Here , I see that every time... (1 Reply)
Discussion started by: shipon_97
1 Replies
6. UNIX for Dummies Questions & Answers
hi,
For some special reason , I'd like to control the memory address for the shared libraries in my dynamically linked process.
And it is the "ld" which interpret the dynamically linked library, and in my system, the "ld-linux.so.2" is put at 0x00812000. Then I use "prelink -r" command to change... (0 Replies)
Discussion started by: zerocool_08
0 Replies
7. Programming
hello all,
am stuck with ?. how to compute limits of char, int, float. i have done it simply displaying values from <limits.h> but i wan to calculate it.. its absolutley not a homework.
thank you. (7 Replies)
Discussion started by: zius_oram
7 Replies
8. HP-UX
Hi,
I have HP-UX 11i v3 running on ia64. One of my application is 32-bit and I want to increase the memory allocation of this file upto 2GB. I am contentiously receiving an error message of Out of Memory.
Can you please explain the procedure what kernel configuration( like maxdsize or... (1 Reply)
Discussion started by: ahmadamin416
1 Replies
9. Programming
I want to run a C program on my linux machine. I want to allocate specific heap size for that process (C program) to run.
How can I do that?
I know in Java same can be done using -Xmx option.
There may be some option which I can specify in the C program like Java or may be in linux process. (8 Replies)
Discussion started by: Ankur Goyal
8 Replies
10. UNIX for Beginners Questions & Answers
Hello Guys,
Is there a single line archive command to zip or tar log files which is larger than certain size limit ?
Do let me know if there is any.
Thanks (7 Replies)
Discussion started by: UnknownGuy
7 Replies
LEARN ABOUT OPENDARWIN
shmdt
SHMAT(2) BSD System Calls Manual SHMAT(2)
NAME
shmat, shmdt -- map/unmap shared memory
SYNOPSIS
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
void *
shmat(int shmid, void *shmaddr, int shmflg);
int
shmdt(void *shmaddr);
DESCRIPTION
shmat() maps the shared memory segment associated with the shared memory identifier shmid into the address space of the calling process. The
address at which the segment is mapped is determined by the shmaddr parameter. If it is equal to 0, the system will pick an address itself.
Otherwise, an attempt is made to map the shared memory segment at the address shmaddr specifies. If SHM_RND is set in shmflg, the system will
round the address down to a multiple of SHMLBA bytes (SHMLBA is defined in <sys/shm.h> ). A shared memory segment can be mapped read-only by
specifying the SHM_RDONLY flag in shmflg. shmdt() unmaps the shared memory segment that is currently mapped at shmaddr from the calling
process' address space. shmaddr must be a value returned by a prior shmat() call. A shared memory segment will remain existant until it is
removed by a call to shmctl(2) with the IPC_RMID command.
RETURN VALUES
shmat() returns the address at which the shared memory segment has been mapped into the calling process' address space when successful,
shmdt() returns 0 on successful completion. Otherwise, a value of -1 is returned, and the global variable errno is set to indicate the error.
ERRORS
shmat() will fail if:
[EACCES] The calling process has no permission to access this shared memory segment.
[ENOMEM] There is not enough available data space for the calling process to map the shared memory segment.
[EINVAL] shmid is not a valid shared memory identifier. shmaddr specifies an illegal address.
[EMFILE] The number of shared memory segments has reached the system-wide limit.
shmdt() will fail if:
[EINVAL] shmaddr is not the start address of a mapped shared memory segment.
SEE ALSO
shmctl(2), shmget(2), mmap(2)
BSD
August 17, 1995 BSD