473,765 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Process and its memory Limit. (Linux biased)

When a process is started three segments are created :
1) Text.
2) Stack.
3) Data.

The size of First two is fixed and their upperlimit is fixed by the
compiler. (Plz correct if i'm wrong)
Now The Data Segment : at the start it's size is small but as the
process goes on and requires Dynamic Memory allocation, its size
increases.

Can i know the limit that how much memory a process can request
dynamically. is there any limit set by process upon a process.

if i want to develop my own memory manager including Garbage collector
for Linux, what are the points should i consider as a precaution.

Jul 8 '07 #1
8 3172
On Jul 8, 3:23 pm, Nehil <nehilparas...@ gmail.comwrote:
When a process is started three segments are created :
1) Text.
2) Stack.
3) Data.

The size of First two is fixed and their upperlimit is fixed by the
compiler. (Plz correct if i'm wrong)
Now The Data Segment : at the start it's size is small but as the
process goes on and requires Dynamic Memory allocation, its size
increases.

Can i know the limit that how much memory a process can request
dynamically. is there any limit set by process upon a process.

if i want to develop my own memory manager including Garbage collector
for Linux, what are the points should i consider as a precaution.
ONE CORRECTION :
plz read following
is there any limit set by process upon a process.
as
is there any limit set by Operating System upon a process.

Jul 8 '07 #2
Nehil wrote:

Firstly direct further Linux based questions to one of the groups in
the comp.os.linux hierarchy or possibly to comp.unix.progr ammer, if
it's common across several Unix'es.
When a process is started three segments are created :
1) Text.
2) Stack.
3) Data.

The size of First two is fixed and their upperlimit is fixed by the
compiler. (Plz correct if i'm wrong)
Now The Data Segment : at the start it's size is small but as the
process goes on and requires Dynamic Memory allocation, its size
increases.

Can i know the limit that how much memory a process can request
dynamically. is there any limit set by process upon a process.
All the details regarding segments are totally off-topic here. They're
more topical is a Linux or assembly language group like
comp.lang.asm.x 86 or alt.lang.asm.
>From a Standard C prespective, a program can request as much memory as
the system is able to provide. It's as simple and as vague as that.
When an allocation request cannot be satisfied malloc or calloc or
realloc return a null pointer. Standard C provides no more facilities.

To find out the system's installed and free memory and any process
based limits, you'll need to consult the APIs provided by your
operating system and C library.
if i want to develop my own memory manager including Garbage collector
for Linux, what are the points should i consider as a precaution.
Again it's best to ask this question in a group dealing with Linux or
Unix.

Jul 8 '07 #3
Nehil wrote:
>
When a process is started three segments are created :
1) Text.
2) Stack.
3) Data.
I see no such things in the C standard. I.e. you are off-topic.

--
<http://www.cs.auckland .ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfoc us.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
cbfalconer at maineline dot net
--
Posted via a free Usenet account from http://www.teranews.com

Jul 8 '07 #4
Nehil wrote:
ONE CORRECTION :
plz read following
is there any limit set by process upon a process.
as
is there any limit set by Operating System upon a process.
Those are platform-specific questions. Why not post them in
platform-specific newsgroups?
Rui Maciel
Jul 8 '07 #5
On Sun, 08 Jul 2007 03:23:07 -0700, Nehil <ne***********@ gmail.com>
wrote:
>When a process is started three segments are created :
1) Text.
2) Stack.
3) Data.

The size of First two is fixed and their upperlimit is fixed by the
compiler. (Plz correct if i'm wrong)
Now The Data Segment : at the start it's size is small but as the
process goes on and requires Dynamic Memory allocation, its size
increases.

Can i know the limit that how much memory a process can request
dynamically. is there any limit set by process upon a process.

if i want to develop my own memory manager including Garbage collector
for Linux, what are the points should i consider as a precaution.
If any of this is true (none of it is on my system), it is specific to
your OS, compiler, and run-time library. You will have better luck
discussing this in a group where they are topical.
Remove del for email
Jul 8 '07 #6
On Sun, 08 Jul 2007 03:23:07 -0700, in comp.lang.c , Nehil
<ne***********@ gmail.comwrote:
>When a process is started three segments are created :
1) Text.
2) Stack.
3) Data.

The size of First two is fixed and their upperlimit is fixed by the
compiler. (Plz correct if i'm wrong)
This is platform=specif ic, If you want to discuss how it works, you
need to ask the experts in your platform in a group specialising in
it.
>Can i know the limit that how much memory a process can request
dynamically. is there any limit set by process upon a process.
if i want to develop my own memory manager including Garbage collector
for Linux, what are the points should i consider as a precaution.
comp.unix.progr ammer
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Jul 8 '07 #7
CBFalconer wrote:
Nehil wrote:
>When a process is started three segments are created :
1) Text.
2) Stack.
3) Data.

I see no such things in the C standard. I.e. you are off-topic.
And anyway, he meant:

1) Text.
2) Data.
3) BSS.

--
+----------------------------------------------------------------+
| Charles and Francis Richmond richmond at plano dot net |
+----------------------------------------------------------------+
Jul 9 '07 #8
Charles Richmond wrote, On 09/07/07 19:17:
CBFalconer wrote:
>Nehil wrote:
>>When a process is started three segments are created :
1) Text.
2) Stack.
3) Data.

I see no such things in the C standard. I.e. you are off-topic.

And anyway, he meant:

1) Text.
2) Data.
3) BSS.
Or maybe not, depending on the implementation. I'm sure I've used an
implementation with a stack section, and if not one implementation I've
used would definitely allow me to create a section called stack and put
the stack in it (or anything else I wanted there).
--
Flash Gordon
Jul 9 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
5126
by: Ember | last post by:
Does anyone have documentation on the limit for database shared memory on Red Hat AS 2.1? On AIX, I know it's 2 GB minus the segments allocated for db2 core functionality (so about 1.7), but I need the numbers for Linux (I've heard that it's only 1 GB). I would also really love it if anyone knows where this is officially documented so I can point some of the teams I'm working with to it. Thanks, Ember
35
5509
by: Alex Martelli | last post by:
Having fixed a memory leak (not the leak of a Python reference, some other stuff I wasn't properly freeing in certain cases) in a C-coded extension I maintain, I need a way to test that the leak is indeed fixed. Being in a hurry, I originally used a q&d hack...: if sys.platform in ('linux2', 'darwin'): def _memsize(): """ this function tries to return a measurement of how much memory this process is consuming, in some arbitrary unit...
22
3022
by: Zen | last post by:
Hi, My production machine has 2G of memory, when aspnet_wp.exe goes up to about ~1.2G of memory usage, I start get out-of-memory exception. Other processes don't use as much memory and I added all the peak memory usage of all the processes (including aspnet_wp.exe), it goes up to no more than 1.5. How is that possible? Would anyone know please help? thanks!
3
3151
by: sadanjan | last post by:
Hi , Appreciate if someone can clarify if database Share Memory Limit (2 GB ) in Unix 32 bit boxes is the top limit for all the databases put together in a database or is it for each of the database in an Instance Thanks & regards sadanjan
13
2686
by: kolmogolov | last post by:
/* Hi, I have removed things irrelevant to reproducing the problem. What's wrong with my code? Thanks in advance for any hint! 1166425362 */ #include <stdio.h> #include <stdlib.h> #include <string.h>
17
8487
by: frederic.pica | last post by:
Greets, I've some troubles getting my memory freed by python, how can I force it to release the memory ? I've tried del and gc.collect() with no success. Here is a code sample, parsing an XML file under linux python 2.4 (same problem with windows 2.5, tried with the first example) : #Python interpreter memory usage : 1.1 Mb private, 1.4 Mb shared #Using http://www.pixelbeat.org/scripts/ps_mem.py to get memory information
4
5806
by: Daniel | last post by:
is there some per-process-limit on memory in .net processes? is there any way to increase it? i keep getting System.OutOfMemoryException when my box has 8 gigs of unused memory.
2
4750
by: Gary Robinson | last post by:
I'm running a Python job on OS X 10.5.3 and the Python 2.5.2 that's available as a binary download at python.org for OS X. I ran a python program tonight that ended up using much more memory than anticipated. It just kept on using more and more memory. Instead of killing it, I just watched it, using Activity Monitor. I assumed that when it had 2GB allocated it would blow up, because I thought 32-bit python could only address 2GB. But...
5
12649
by: Max2006 | last post by:
Hi, What is the limit for memory that a .NET process or AppDomain can use? Thank you, Max
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10161
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9955
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9833
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8831
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5421
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.