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.