Heap ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi all,
         i was going through a tutorial on
implementing a threads library on linux. I have a
couple of doubts:

What i understand is the process address space
consists of 

Stack
Unallocated space
Heap
Program code and data

Now my doubt is when i do a malloc
1) will memory be allocated from the heap ?
If yes, till what extent can it go pushing the heap
upwards ? What happens exactly ? some pointers wud be
helpfull with your comments .

2) When i do a malloc will the memory be allocated
physically from the heap - i.e would the newly
allocated memory be from the heap.I mean would the
addresses (of newly allocated memory by malloc()) be
the addresses of the memory locations of the heap ?

3) Process Adress spaces are fixed for all processes ?
   If yes,What would happen if a process needs
comparitively large chunks of memmory which normal
programs won't need ?

thank you.

Amith
PS: i have more questions thought will post 2+1 at a
time :-) 



__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux