Re: allocation of memory to a program



On Mar 28, 1:37 am, David Schwartz <dav...@xxxxxxxxxxxxx> wrote:
On Mar 27, 1:07 pm, mohi <mohangupt...@xxxxxxxxx> wrote:

hello everyone
can anyone please tell we how the os kernel determines the size of
memory to be allocated
to a program while it is sheduled, here i mean how it determines the
size of the heap and the stack memory to be allocated to it .
all help is appreciated
moahn

Your question doesn't really make sense. First, it's not clear whether
it's about physical memory or virtual memory. Second, it implies that
memory is allocated when a process is scheduled, which is not the
case. Memory is allocated when the process requests it.

What are you trying to ask? It's not clear.

DS

sir ,
mean that presently i was reading about physical memory allocators and
wanted to know ,as the size entry of the program( the size of the
program in directory entry) includes the size of the code of the
program and not that of the dynamic memory which that program may
require(as i think) ,so how does the kernel or the allocater decides
what block of memory should be actually allocated to the program(which
will also include the dynamic memory which may be required by the
program beside the memory required for its code.
mohan
.



Relevant Pages

  • Re: Red-black trees?
    ... significant way on the amount of storage requested. ... assigned memory the first program released. ... You're mixing up two different issues, initializing space used by ... Some storage allocators initialize allocated storage, ...
    (comp.programming)
  • Re: STL Slow - VS2005
    ... will give slower node reuse but heap memory use will be minimal as it is ... Instead they measure the default choice of allocators that comes ... to inform the library designers what their intention is with a container. ... don depend on the choice of growth factor for vector, string. ...
    (microsoft.public.vc.stl)
  • Re: OO compilers and efficiency
    ... > would entirely agree with you -- people who think they can code faster ... In C you can make "custom allocators" which will allocate ... you collapse the memory by freeing them in blocks at a time. ... C is a horrible programming language has caused the software ...
    (comp.programming)
  • Re: allocation of memory to a program
    ... size of the heap and the stack memory to be allocated to it. ... mean that presently i was reading about physical memory allocators and ... require,so how does the kernel or the allocater decides ... i.e. global variables that are not assigned initial values ...
    (comp.os.linux.development.system)
  • Re: Memory allocation methods
    ... > Martina Burger wrote: ... >> my program frequently allocats and deallocates memory with various ... > - the runtime allocators do not set a thread's last error in case they ...
    (microsoft.public.win32.programmer.kernel)