How to get address space size that a process is allowed to use


 
Thread Tools Search this Thread
Top Forums Programming How to get address space size that a process is allowed to use
# 1  
Old 05-05-2010
How to get address space size that a process is allowed to use

Hi All,

From C++, I just want to find the address space size that a process is allowed to use. For ex, in 32 bit OS the allowed address space is 4GB and in 64 bit OS I guess this is 16GB or more.

I jsut want to find it in my C++ project. Is there any API calls that gives me such information.

Thanks,
Sendil
# 2  
Old 05-05-2010
man getrlimit
# 3  
Old 05-05-2010
Quote:
Originally Posted by Sendil Kumar
Hi All,

From C++, I just want to find the address space size that a process is allowed to use. For ex, in 32 bit OS the allowed address space is 4GB and in 64 bit OS I guess this is 16GB or more.
To expand on achenle's suggestion, 4GB in a 32-bit system is the physical limit. There are 4GB possible different addresses a process can possibly have in its' address space in a 32-bit address space. Doesn't mean the OS will actually let it have that much.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Process holding /tmp space, need to know the process details

Hi , In a server /tmp has almost reached 75% and i can see the File system utilization is 48Mb only , so i believe some process is using the /tmp space. I would like to know which process is using /tmp space. # df -h /tmp Filesystem size used avail capacity Mounted on swap ... (9 Replies)
Discussion started by: chidori
9 Replies

2. Programming

PC RAM and process address space

Suppose I have 3 gb of ram and 250 gb hard disk in my pc. Now I wrote a simple C program having only one statement malloc() to allocate 4 gb of memory as 32 bit os can address 4gb address space then will the malloc succeed? If yes then how it will get extra 1 gb of memory? Does the process gets... (3 Replies)
Discussion started by: rupeshkp728
3 Replies

3. Shell Programming and Scripting

space not allowed in input

I have this script. (options is an array) It works fine. It responds fine to all items that are stored in the array. But when I press spacebar when I am asked for input. It will not give an error only run the function again. While I put : || ] in the script to capture the space. What am I missing... (6 Replies)
Discussion started by: Alex400
6 Replies

4. Shell Programming and Scripting

Error PHP Fatal error: Allowed memory size of 67108864 bytes exhausted(tried to allocate 401 bytes)

While running script I am getting an error like Few lines in data are not being processed. After googling it I came to know that adding such line would give some memory to it ini_set("memory_limit","64M"); my input file size is 1 GB. Is that memory limit is based on RAM we have on... (1 Reply)
Discussion started by: elamurugu
1 Replies

5. Web Development

PHP Fatal error: Allowed memory size of 134217728 bytes exhausted

Any clues on how to get rid of this PHP error? PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 bytes) in /website/www/includes/functions_manpages.php on line 58 PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 71... (4 Replies)
Discussion started by: Neo
4 Replies

6. UNIX for Advanced & Expert Users

Can kernel process access user address space ?

Can kernel process access user address space ? (2 Replies)
Discussion started by: subhotech
2 Replies

7. Programming

Find Virtual address space size for process

Hi, I am looking to work on unix systems which include (hp-ux, ibm aix, solaris and linux). I want to get the total virtual address space of a process, the used virtual memory i am able to get without any problem. I have tried using getrlimit and getrlimit64, but that gives only ... (4 Replies)
Discussion started by: uiqbal
4 Replies

8. AIX

How to increase memory size allowed to one process

Hi, I have migrated some processing from true64 --> AIX 5.3. my problem is to process large files in memory by diff or awk program. I need to load app. 1.3 GB of data into memory but it fails that there is not enough memory. I need following: diff file1 file2 orig. aix diff err... (2 Replies)
Discussion started by: Petr
2 Replies

9. UNIX for Dummies Questions & Answers

How to find the size of Process Address space.

Hello, Please help me to know, How to find out the how much amount of process addres space is required/is used for/by a process. Tnx & Regards Vishwa. (1 Reply)
Discussion started by: S.Vishwanath
1 Replies
Login or Register to Ask a Question