Re: Big allocation AND per process memory!

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I'm not sure what is your question.

First, let's confine ourselves to the usual 2GB kernel space/2GB user space
setup.

Next, an allocation is in kernel space or user space. An allocation will not
span. That's just the way the OS is (I won't go into reasons).

Next, in the kernel 2GB some space is taken with executables (binaries like
the kernel, HAL, drivers), page tables, lookasides of various kinds and
plain old data.

Next, in the kernel an allocation will be satisfied only from a kind of
storage such as pageable or non-paged (there are also flavors that are
suitable for DMA, etc, etc.). These types are confined to virtual memory
ranges.

Next, some other virtual ranges just aren't used.

The end result is that a given allocation, in a freshly booted system
(nobody has grabbed memory beyond what the OS and device drivers must have),
the maximum allocation is going to be rather less than 2GB.

The short of all this is that memory comes in lots of flavors, and an
allocation always includes a flavor (maybe by default), and a flavor can be
carved out of only a certain virtual range, a range that is always less than
the 2GB that comprises all possible flavors.

Similar reasoning applies to user space.

--
James Antognini
Windows DDK and WDK Support


This posting is provided "AS IS" with no warranties, and confers no rights.



"Ali" <abdulrazaq@xxxxxxxxx> wrote in message
news:1129306145.199816.305290@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Thanks Born,
>
> 1. Boot your system with /3GB (Windows NT & 2000) or /4GT (Windows
> 2003) switch. This way, kernel will only use 1 GB and applications can
> use 3 GB.
>
> 2. If you have more physical memory installed and your hardware is
> Intel with PAE support, boot Windows with /PAE switch. This way you can
> use up to 64 GB memory from your application via AWE (Address Windowing
> Extensions).
>
> See this link for details.
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/memory/base/large_memory_support.asp
>
>
> I believe that this is for allocating space for a file not for a
> process itself! right? nothing math just few thoughts;-)
>
> Thanks for post.
> Regars
> -ali
>


.



Relevant Pages

  • Re: Huge pages and small pages. . .
    ... Since the CPU uses virtual memory always, ... The actual allocation only occurs when an access happens. ... the kernel just marks a promised ... DMA operation occurs that crosses page boundaries. ...
    (Linux-Kernel)
  • Re: size_t or int for malloc-type functions?
    ... Some go as high as 3GB with special boot ... RedHat has a special Linux kernel that gives just under 4GB of user address space; a bit of kernel space is still required to keep syscalls working, ... It's mainly used by database folks, who should be moving to AMD64 now anyways (with its 2^51 bytes of user space, currently). ... of like the old extended/expanded memory hacks in the DOS days. ...
    (comp.lang.c)
  • Re: Memory
    ... The Linux kernel has two main ways to deal with an OOM situation. ... an RAM assignment is allocated. ... heuristics) and terminates it rather aggressively, freeing the memory ... Also encountered is a more "traditional" memory allocation failure. ...
    (Debian-User)
  • Re: [swsusp] separate snapshot functionality to separate file
    ... >> Split does not prevent you from doing the cleanups. ... Kernel needs to use get_user, ... > memory directly from the used space. ... > not be visible to the user space at all. ...
    (Linux-Kernel)
  • Re: How to use a syscall in a module for 2.6.8 - header file problems
    ... > Kernel memory is never swapped out. ... The kernel simply wouldn't work if a kernel ... > stack was swapped out. ... Every allocation ...
    (comp.os.linux.development.system)