When we do
Expand|Select|Wrap|Line Numbers
- int *p=malloc(100000);
1.taken from the system memory and whole 100000 bytes added into the process' heap memory segment
2.taken from the process' heap memory(process' heap already had this memory,it has turned accessible now )
3.taken from the system memory and address to that memory is added to the heap segment of the process.So p actually points to 100000 bytes in the system memory.
????