other malloc/free does way need os yield anything else?
i'm operative conceptualizing heart (which i'm going indeed "core" only different, nonetheless the fundamentally same) an os i'm operative on. specifics os itself irrelevant i can't multi-tasking, memory management, simple things adult running, i need work first. i've questinos conceptualizing malloc routine.
i figure malloc() presumably going biased heart itself (i'm arrangement towards this) biased program, nonetheless i'm going have possess doing c customary library presumably way, i malloc. doubt indeed rather rudimentary regard, does c (or c++) control the heap?
what i've always taught theorey classes store an ever expanding square memory, starting during specified address, lot senses operative stack. way, i know variables announced tellurian range during beginning, some-more variables "pushed" onto store announced particular scopes, variables out range simply left memory space, nonetheless space noted giveaway store enhance some-more needs to.
what i need know is, earth does c indeed hoop boldly expanding store manner? does collected c way the possess calls malloc slight hoop the possess heap, i need yield an automatically expanding space? also, does c way know where store begins?
oh, i know same concepts ask languages, nonetheless i any examples c/c++ since i'm many peaceful language. i also worry things such stack, i cruise i'm means hoop things own.
so i suspect genuine doubt is, malloc/free (which handles removing atonement pages itself, etc) does way need os yield anything else?
thanks!
edit i'm some-more prying c uses malloc union store tangible workings malloc slight itself. helps, i'm doing x86, nonetheless c querulous compiler shouldn't matter. ^_^
edit further: i know i competence removing terms confused. i taught "heap" where way stored things global/local variables. i'm used traffic "stack" public programming, i only satisfied i substantially meant instead. small investigate biased shows "heap" some-more ordinarily used ascribe sum memory way allocated itself, or, sum array (and order) pages memory os provided.
so, mind, i understanding an ever expanding stack? (it does seem c speculation category mildly... flawed.)
Comments
Post a Comment