Sponsored Content
Top Forums Programming How to get address space size that a process is allowed to use Post 302418740 by Sendil Kumar on Wednesday 5th of May 2010 08:29:13 AM
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
 

9 More Discussions You Might Find Interesting

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

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

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

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

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

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

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

9. 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
mlockall(2)							System Calls Manual						       mlockall(2)

NAME
mlockall() - lock a process virtual address space in memory SYNOPSIS
DESCRIPTION
The system call allows the calling process to lock its entire virtual address space into memory, making it immune to all routine swapping. flags may be one or both of the following: Lock the current process virtual address space. All addressable pages of the address space are locked. Lock any future additions to the process virtual address space. Note that does not imply or can be used to unlock all or a portion of the address space locked with A single call to removes all locks from the process virtual address space. An call results in only the specified pages being unlocked. Regardless of how many times a process locks a page, a single or will unlock it. When memory is shared by multiple processes and mlocks are applied to the same physical page by multiple processes, a page remains locked until the last lock is removed from that page. Locks and applied with are not inherited by a child process. The user must have the privilege. Although and the family of functions may be used together in an application, each may affect the other in unexpected ways. This practice is not recommended. Security Restrictions Some or all of the actions associated with this system call require the privilege. Processes owned by the superuser have this privilege. Processes owned by other users may have this privilege, depending on system configuration. See privileges(5) for more information about privileged access on systems that support fine-grained privileges. RETURN VALUE
returns the following values: Successful completion. Failure. The requested operation is not performed. is set to indicate the error. ERRORS
If fails, is set to one of the following values: The flags field did not contain either and/or There is not enough lockable memory in the system to satisfy the locking request. The user does not have the privilege. EXAMPLES
The following call to locks the entire process virtual address space in memory and ensures that any future additions to the address space will also be locked in memory: SEE ALSO
setprivgrp(1M), getprivgrp(2), mlock(2), munlock(2), munlockall(2), plock(2), privileges(5). STANDARDS CONFORMANCE
mlockall(2)
All times are GMT -4. The time now is 01:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy