Click here to Skip to main content
15,943,245 members
Home / Discussions / C#
   

C#

 
GeneralRe: How memory is allocated in .Net application Pin
Tridip Bhattacharjee1-Mar-15 21:22
professionalTridip Bhattacharjee1-Mar-15 21:22 
GeneralRe: How memory is allocated in .Net application Pin
manchanx26-Feb-15 4:24
professionalmanchanx26-Feb-15 4:24 
GeneralRe: How memory is allocated in .Net application Pin
Tridip Bhattacharjee26-Feb-15 22:01
professionalTridip Bhattacharjee26-Feb-15 22:01 
GeneralRe: How memory is allocated in .Net application Pin
Pete O'Hanlon26-Feb-15 22:53
mvePete O'Hanlon26-Feb-15 22:53 
GeneralRe: How memory is allocated in .Net application Pin
OriginalGriff26-Feb-15 4:41
mveOriginalGriff26-Feb-15 4:41 
GeneralRe: How memory is allocated in .Net application Pin
Santosh K. Tripathi2-Mar-15 17:07
professionalSantosh K. Tripathi2-Mar-15 17:07 
AnswerRe: How memory is allocated in .Net application Pin
F-ES Sitecore26-Feb-15 3:59
professionalF-ES Sitecore26-Feb-15 3:59 
GeneralRe: How memory is allocated in .Net application Pin
Tridip Bhattacharjee26-Feb-15 4:16
professionalTridip Bhattacharjee26-Feb-15 4:16 
thanks for the answer but still few lines are not very clear. can u plzz explain it more elaborately in easy way.

you said not clear "As you put something on the stack the pointer goes up, you take something off it goes down. If you have, say, an int (10), a string ("ab") and an int (20) on the stack;

Stack add 0 - 10
Stack add 1 - a
Stack add 2 - b
Stack add 3 - 20
Stack add 4 - < stack pointer points here, put something else on and this is where it goes

and then wanted to change the string from "ab" to "abc"...where do you store the "c"? There is no space as your second int is on top of it so to increase the string from "ab" to "abc" would require reordering everything above it. So you can only put things on the stack that don't change in size. An int is always going to be 32 bits for example (depending on os and hardware).

2) you said but not clear "Of course value types can end up on the heap too due to things already mentioned, due to boxing, static variables etc,"
tbhattacharjee

GeneralRe: How memory is allocated in .Net application Pin
F-ES Sitecore26-Feb-15 4:42
professionalF-ES Sitecore26-Feb-15 4:42 
GeneralRe: How memory is allocated in .Net application Pin
Richard MacCutchan26-Feb-15 5:09
mveRichard MacCutchan26-Feb-15 5:09 
GeneralRe: How memory is allocated in .Net application Pin
Tridip Bhattacharjee26-Feb-15 21:03
professionalTridip Bhattacharjee26-Feb-15 21:03 
GeneralRe: How memory is allocated in .Net application Pin
Richard MacCutchan26-Feb-15 21:19
mveRichard MacCutchan26-Feb-15 21:19 
GeneralRe: How memory is allocated in .Net application Pin
Santosh K. Tripathi2-Mar-15 17:18
professionalSantosh K. Tripathi2-Mar-15 17:18 
GeneralRe: How memory is allocated in .Net application Pin
Richard MacCutchan26-Feb-15 22:30
mveRichard MacCutchan26-Feb-15 22:30 
QuestionRegarding Network buffer and datareader data fetch c# Pin
Tridip Bhattacharjee26-Feb-15 2:33
professionalTridip Bhattacharjee26-Feb-15 2:33 
GeneralRe: Regarding Network buffer and datareader data fetch c# Pin
PIEBALDconsult26-Feb-15 3:31
mvePIEBALDconsult26-Feb-15 3:31 
QuestionNeed help for auto response of a sms Pin
MA11026-Feb-15 2:03
MA11026-Feb-15 2:03 
AnswerRe: Need help for auto response of a sms Pin
Richard Andrew x6426-Feb-15 9:08
professionalRichard Andrew x6426-Feb-15 9:08 
QuestionNeed various algo asked during interview for dotnet C# Pin
Tridip Bhattacharjee26-Feb-15 0:19
professionalTridip Bhattacharjee26-Feb-15 0:19 
AnswerRe: Need various algo asked during interview for dotnet C# Pin
Pete O'Hanlon26-Feb-15 0:56
mvePete O'Hanlon26-Feb-15 0:56 
GeneralRe: Need various algo asked during interview for dotnet C# Pin
Tridip Bhattacharjee26-Feb-15 2:25
professionalTridip Bhattacharjee26-Feb-15 2:25 
GeneralRe: Need various algo asked during interview for dotnet C# Pin
Richard Givis24-Mar-15 11:03
Richard Givis24-Mar-15 11:03 
AnswerRe: Need various algo asked during interview for dotnet C# Pin
OriginalGriff26-Feb-15 0:57
mveOriginalGriff26-Feb-15 0:57 
GeneralRe: Need various algo asked during interview for dotnet C# Pin
Tridip Bhattacharjee26-Feb-15 2:25
professionalTridip Bhattacharjee26-Feb-15 2:25 
GeneralRe: Need various algo asked during interview for dotnet C# Pin
OriginalGriff26-Feb-15 2:37
mveOriginalGriff26-Feb-15 2:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.