Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #87313

Re: Windows does overcommit stacks !

From Bonita Montero <Bonita.Montero@gmail.com>
Newsgroups comp.lang.c++
Subject Re: Windows does overcommit stacks !
Date 2022-11-10 14:08 +0100
Organization A noiseless patient Spider
Message-ID <tkit4e$i7ub$1@dont-email.me> (permalink)
References <tkhqdn$fho3$1@dont-email.me> <5194adaf-d276-4fdb-b422-55e4a6ed5d70n@googlegroups.com> <tkio2e$hqak$1@dont-email.me> <9cae8649-0e8f-458b-af14-39616a1d9cbbn@googlegroups.com>

Show all headers | View raw


Am 10.11.2022 um 13:34 schrieb Michael S:

> Ones again, you don't know the meaning of 'overcommit'.
> As long as area that was successfully committed either by
> VirtualAlloc(..., MEM_COMMIT, ...) or by other means is
> guaranteed to be legal to access from user mode, it's not
> called 'overcommitment' even when the process of access
> begins by page fault.

With stacks things are different. The commit is done by the kernel when
you hit the guard page. If you touch the stack's address range beyond
the guard page the application crashes. If the kernel can't dynamically
commit the memory for the guard page you hit you get a SEH guard page
exeption - earlier than with the last valid position of the guard page
when the stack "successfully" extends to its maximum range. So if you
have a default stack size of one MB, you might get one MB minus the
size of the (last) guard page, but this actually might not happen if
the system runs out of memor meanwhile.

Back to comp.lang.c++ | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Windows does overcommit stacks ! Bonita Montero <Bonita.Montero@gmail.com> - 2022-11-10 04:16 +0100
  Re: Windows does overcommit stacks ! yx ma <myxfxtstart@gmail.com> - 2022-11-09 23:32 -0800
  Re: Windows does overcommit stacks ! Michael S <already5chosen@yahoo.com> - 2022-11-10 02:59 -0800
    Re: Windows does overcommit stacks ! Bonita Montero <Bonita.Montero@gmail.com> - 2022-11-10 12:42 +0100
      Re: Windows does overcommit stacks ! Michael S <already5chosen@yahoo.com> - 2022-11-10 04:34 -0800
        Re: Windows does overcommit stacks ! Bonita Montero <Bonita.Montero@gmail.com> - 2022-11-10 14:08 +0100
          Re: Windows does overcommit stacks ! Öö Tiib <ootiib@hot.ee> - 2022-11-10 05:18 -0800
            Re: Windows does overcommit stacks ! Bonita Montero <Bonita.Montero@gmail.com> - 2022-11-10 14:36 +0100
  Re: Windows does overcommit stacks ! Bonita Montero <Bonita.Montero@gmail.com> - 2022-11-14 22:03 +0100
    Re: Windows does overcommit stacks ! Öö Tiib <ootiib@hot.ee> - 2022-11-15 04:09 -0800
      Re: Windows does overcommit stacks ! Bonita Montero <Bonita.Montero@gmail.com> - 2022-11-15 14:23 +0100
        Re: Windows does overcommit stacks ! Michael S <already5chosen@yahoo.com> - 2022-11-15 06:23 -0800
          Re: Windows does overcommit stacks ! Bonita Montero <Bonita.Montero@gmail.com> - 2022-11-15 16:39 +0100
  Re: Windows does overcommit stacks ! Bonita Montero <Bonita.Montero@gmail.com> - 2023-03-20 18:45 +0100

csiph-web