Process and its memory Limit. (Linux biased)

N

Nehil

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

Nehil

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

Rui Maciel

Nehil said:
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
 
S

santosh

Nehil wrote:

Firstly direct further Linux based questions to one of the groups in
the comp.os.linux hierarchy or possibly to comp.unix.programmer, 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.x86 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.
 
C

CBFalconer

Nehil said:
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.
 
B

Barry Schwarz

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
 
M

Mark McIntyre

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=specific, 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.programmer
--
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
 
F

Flash Gordon

Charles Richmond wrote, On 09/07/07 19:17:
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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,201
Latest member
KourtneyBe

Latest Threads

Top