Re: physical memory allocated to a program



On Mar 28, 2:59 am, mohi <mohangupt...@xxxxxxxxx> wrote:

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.

You have a tendency to ask very vague questions. If I understand your
question correctly, which I may or may not, the answer is: The
allocator gives the process any page of physical memory that it is not
currently using. If it has no free physical memory, it finds a
discardable page and frees it. A page is "discardable" if it contains
data the kernel can easily get back, such as an unmodified copy of a
piece of a file.

This is done on-demand, as explained in the other thread you started.
When the process accesses a page that is not resident in memory, the
kernel's fault handler is invoked. If the fault handler determines
that the access is valid, it maps a page of physical memory at the
address that caused the fault and the process resumes.

DS
.



Relevant Pages

  • Memory Mapped Files: does it reduce Flash wear?
    ... operations on persistent memory. ... In order to avoid writing to the FAT table of a CompactFlash card, ... was looking at the use of memory mapped files. ... mapped file write means a directory entry write, ...
    (microsoft.public.windowsce.embedded)
  • physical memory allocated to a program
    ... presently i was reading about physical memory allocators and wanted ... directory entry) includes the size of the code of the program and not ... include the dynamic memory which may be required by the program beside ...
    (comp.os.linux.development.system)
  • relic Have you learned how to post yet?
    ... As you have a selective memory, here is the source code for you. ... applications with a 4 GB virtual address space. ... that run on computers with more than 2 GB of physical memory. ... Address Windowing Extensions (AWE) enables applications to address more = ...
    (alt.os.windows-xp)
  • Re: Is there a maximum contiguous memory allocation?
    ... Most of it would be paged out most of the time, but could ALLOCATE it! ... allocate it if I had 2GB of physical memory! ... the amount of physical memory I have installed. ... Note that you can use raw VirtualAlloc to improve your ...
    (microsoft.public.vc.mfc)
  • Re: RAM
    ... For applications that are I/O-intensive, ... The 4GT RAM Tuning feature increases the memory ... more than 2 GB of physical memory. ... VirtualAlloc function. ...
    (alt.os.windows-xp)