Sujet : Re: stack sizes, Segments
De : mitchalsup (at) *nospam* aol.com (MitchAlsup1)
Groupes : comp.archDate : 23. Jan 2025, 03:47:17
Autres entêtes
Organisation : Rocksolid Light
Message-ID : <214ed8b743ce4dc75cfec22daa9b8880@www.novabbs.org>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Rocksolid Light
On Thu, 23 Jan 2025 1:07:02 +0000, Scott Lurndal wrote:
Michael S <already5chosen@yahoo.com> writes:
On Wed, 22 Jan 2025 15:01:34 GMT
scott@slp53.sl.home (Scott Lurndal) wrote:
>
Michael S <already5chosen@yahoo.com> writes:
On Wed, 22 Jan 2025 02:54:33 -0000 (UTC)
John Levine <johnl@taugh.com> wrote:
>
According to George Neuner <gneuner2@comcast.net>:
Not standard compliant for sure, but you certainly can approximate
stack use in C: just store (as byte*) the address of a local in
your top level function, and check the (absolute value of) the
difference to the address of a local in the current function.
>
Ugh, but yes that would work with the usual stack structure,
>
The bigger problem is knowing how much stack is available to use -
there may be no way (or no easy way) to find the actual size ...
or the limit if the stack expands ... and circumstances beyond the
program may have limited it to be smaller than the program
requested.
>
There's often no way to tell since it may depend on things like
running out of swap space which depends on how much memory other
programs are using.
>
>
At least you can know the size of reserved VA space which is both an
upper bound of the limit and in 99% of the cases an actual limit.
>
On Windows:
https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getcurrentthreadstacklimits
>
I suppose that similar functions are available on other OSes as well.
>
>
https://pubs.opengroup.org/onlinepubs/9799919799/functions/pthread_attr_getstack.html
>
There is no equivlent function for the main process stack,
>
>
Do you mean "there is no equivlent *POSIX* function", right?
But I sincerily hope that most Unix-like systems provide such
functionality in system-specific manner. Because it looks usable.
>
What would an application (portable or otherwise) use the process
stack base address for?
As a place to put TLS (or &TLS) on register-starved architectures.
Date | Sujet | # | | Auteur |
1 Oct 24 | Re: Whether something is RISC or not (Re: PDP-8 theology, not Concertina II Progress) | 387 | | MitchAlsup1 |
1 Oct 24 |  Re: Whether something is RISC or not (Re: PDP-8 theology, not Concertina II Progress) | 386 | | Thomas Koenig |
1 Oct 24 |   Re: Whether something is RISC or not (Re: PDP-8 theology, not Concertina II Progress) | 379 | | MitchAlsup1 |
2 Oct 24 |    Re: Whether something is RISC or not (Re: PDP-8 theology, not Concertina II Progress) | 377 | | Brett |
3 Oct 24 |     Re: Whether something is RISC or not (Re: PDP-8 theology, not Concertina II Progress) | 376 | | Lawrence D'Oliveiro |
3 Oct 24 |      Re: Whether something is RISC or not (Re: PDP-8 theology, not Concertina II Progress) | 1 | | Brett |
3 Oct 24 |      Re: Whether something is RISC or not (Re: PDP-8 theology, not Concertina II Progress) | 1 | | Anton Ertl |
3 Oct 24 |      Re: Whether something is RISC or not (Re: PDP-8 theology, not Concertina II Progress) | 373 | | David Brown |
3 Oct 24 |       Byte ordering (was: Whether something is RISC or not) | 372 | | Anton Ertl |
3 Oct 24 |        Re: Byte ordering (was: Whether something is RISC or not) | 1 | | David Brown |
3 Oct 24 |        Re: Byte ordering (was: Whether something is RISC or not) | 369 | | Lawrence D'Oliveiro |
4 Oct 24 |         Re: Byte ordering | 1 | | Lynn Wheeler |
4 Oct 24 |         Re: Byte ordering (was: Whether something is RISC or not) | 365 | | David Brown |
4 Oct 24 |          Re: Byte ordering (was: Whether something is RISC or not) | 364 | | Anton Ertl |
4 Oct 24 |           Re: Byte ordering | 5 | | BGB |
5 Oct 24 |            Re: Byte ordering | 4 | | MitchAlsup1 |
5 Oct 24 |             Re: Byte ordering | 2 | | BGB |
5 Oct 24 |              Re: Byte ordering | 1 | | Lawrence D'Oliveiro |
5 Oct 24 |             Re: Byte ordering | 1 | | Lawrence D'Oliveiro |
5 Oct 24 |           Re: Byte ordering (was: Whether something is RISC or not) | 13 | | Lawrence D'Oliveiro |
5 Oct 24 |            Re: Byte ordering (was: Whether something is RISC or not) | 12 | | Brett |
5 Oct 24 |             Re: Byte ordering (was: Whether something is RISC or not) | 11 | | Anton Ertl |
5 Oct 24 |              Re: Byte ordering (was: Whether something is RISC or not) | 10 | | Michael S |
6 Oct 24 |               Re: Byte ordering | 1 | | Terje Mathisen |
6 Oct 24 |               Re: Byte ordering (was: Whether something is RISC or not) | 8 | | Brett |
7 Oct 24 |                Re: Byte ordering (was: Whether something is RISC or not) | 7 | | Lawrence D'Oliveiro |
7 Oct 24 |                 Re: Byte ordering (was: Whether something is RISC or not) | 6 | | Brett |
7 Oct 24 |                  Re: Byte ordering (was: Whether something is RISC or not) | 5 | | Michael S |
7 Oct 24 |                   Re: Byte ordering | 2 | | Stefan Monnier |
7 Oct 24 |                    Re: Byte ordering | 1 | | Michael S |
7 Oct 24 |                   Re: Byte ordering (was: Whether something is RISC or not) | 2 | | Lawrence D'Oliveiro |
8 Oct 24 |                    Re: Byte ordering | 1 | | Terje Mathisen |
6 Oct 24 |           Re: Byte ordering | 345 | | David Brown |
6 Oct 24 |            Re: Byte ordering | 344 | | Anton Ertl |
6 Oct 24 |             Re: Byte ordering | 189 | | John Dallman |
7 Oct 24 |              Re: Byte ordering | 20 | | Lawrence D'Oliveiro |
8 Oct 24 |               Re: Byte ordering | 19 | | John Dallman |
9 Oct 24 |                VMS/NT memory management (was: Byte ordering) | 1 | | Stefan Monnier |
15 Oct 24 |                Re: Byte ordering | 2 | | Lawrence D'Oliveiro |
15 Oct 24 |                 Re: Byte ordering | 1 | | MitchAlsup1 |
15 Oct 24 |                Re: Byte ordering | 15 | | Lawrence D'Oliveiro |
15 Oct 24 |                 Re: Byte ordering | 3 | | Michael S |
15 Oct 24 |                  Re: Byte ordering | 1 | | John Dallman |
18 Oct 24 |                  Re: Byte ordering | 1 | | Lawrence D'Oliveiro |
15 Oct 24 |                 Re: Byte ordering | 9 | | John Dallman |
16 Oct 24 |                  Re: Byte ordering | 7 | | George Neuner |
16 Oct 24 |                   Re: Byte ordering | 6 | | Terje Mathisen |
16 Oct 24 |                    Re: Byte ordering | 5 | | David Brown |
17 Oct 24 |                     Re: Byte ordering | 2 | | George Neuner |
17 Oct 24 |                      Re: Byte ordering | 1 | | David Brown |
17 Oct 24 |                     Re: clouds, not Byte ordering | 2 | | John Levine |
17 Oct 24 |                      Re: clouds, not Byte ordering | 1 | | David Brown |
18 Oct 24 |                  Re: Byte ordering | 1 | | Lawrence D'Oliveiro |
16 Oct 24 |                 Re: Byte ordering | 2 | | Paul A. Clayton |
18 Oct 24 |                  Re: Microkernels & Capabilities (was Re: Byte ordering) | 1 | | Lawrence D'Oliveiro |
7 Oct 24 |              80286 protected mode | 168 | | Anton Ertl |
7 Oct 24 |               Re: 80286 protected mode | 5 | | Lars Poulsen |
7 Oct 24 |                Re: 80286 protected mode | 4 | | Terje Mathisen |
7 Oct 24 |                 Re: 80286 protected mode | 1 | | Michael S |
7 Oct 24 |                 Re: 80286 protected mode | 2 | | Lawrence D'Oliveiro |
8 Oct 24 |                  Re: 80286 protected mode | 1 | | Terje Mathisen |
7 Oct 24 |               Re: 80286 protected mode | 3 | | Brett |
7 Oct 24 |                Re: 80286 protected mode | 2 | | Michael S |
7 Oct 24 |                 Re: 80286 protected mode | 1 | | Brett |
7 Oct 24 |               Re: 80286 protected mode | 1 | | Lawrence D'Oliveiro |
8 Oct 24 |               Re: 80286 protected mode | 152 | | MitchAlsup1 |
8 Oct 24 |                Re: 80286 protected mode | 4 | | Lawrence D'Oliveiro |
8 Oct 24 |                 Re: 80286 protected mode | 3 | | MitchAlsup1 |
9 Oct 24 |                  Re: 80286 protected mode | 1 | | David Brown |
15 Oct 24 |                  Re: 80286 protected mode | 1 | | Lawrence D'Oliveiro |
8 Oct 24 |                Re: 80286 protected mode | 147 | | Anton Ertl |
8 Oct 24 |                 Re: 80286 protected mode | 1 | | Robert Finch |
9 Oct 24 |                 Re: 80286 protected mode | 145 | | David Brown |
9 Oct 24 |                  Re: 80286 protected mode | 79 | | MitchAlsup1 |
9 Oct 24 |                   Re: 80286 protected mode | 78 | | David Brown |
9 Oct 24 |                    Re: 80286 protected mode | 77 | | Stephen Fuld |
10 Oct 24 |                     Re: 80286 protected mode | 2 | | MitchAlsup1 |
10 Oct 24 |                      Re: 80286 protected mode | 1 | | David Brown |
10 Oct 24 |                     Re: 80286 protected mode | 1 | | David Brown |
11 Oct 24 |                     Re: 80286 protected mode | 73 | | Tim Rentsch |
15 Oct 24 |                      Re: 80286 protected mode | 72 | | Stefan Monnier |
15 Oct 24 |                       Re: 80286 protected mode | 30 | | MitchAlsup1 |
16 Oct 24 |                        Re: 80286 protected mode | 25 | | MitchAlsup1 |
16 Oct 24 |                         Re: C and turtles, 80286 protected mode | 13 | | John Levine |
16 Oct 24 |                          Re: C and turtles, 80286 protected mode | 7 | | MitchAlsup1 |
16 Oct 24 |                           Re: C and turtles, 80286 protected mode | 6 | | John Levine |
17 Oct 24 |                            Re: C and turtles, 80286 protected mode | 5 | | Thomas Koenig |
20 Oct 24 |                             Re: C and turtles, 80286 protected mode | 4 | | Lawrence D'Oliveiro |
20 Oct 24 |                              Re: C and turtles, 80286 protected mode | 3 | | George Neuner |
22 Oct 24 |                               Re: C and turtles, 80286 protected mode | 2 | | Tim Rentsch |
22 Oct 24 |                                Re: C and turtles, 80286 protected mode | 1 | | George Neuner |
16 Oct 24 |                          Re: C and turtles, 80286 protected mode | 1 | | David Brown |
16 Oct 24 |                          Re: C and turtles, 80286 protected mode | 4 | | Paul A. Clayton |
17 Oct 24 |                           Re: C and turtles, 80286 protected mode | 1 | | David Brown |
20 Oct 24 |                           Re: C and turtles, 80286 protected mode | 2 | | Lawrence D'Oliveiro |
20 Oct 24 |                            Re: C and turtles, 80286 protected mode | 1 | | Paul A. Clayton |
16 Oct 24 |                         Re: 80286 protected mode | 7 | | Thomas Koenig |
16 Oct 24 |                          Re: 80286 protected mode | 2 | | MitchAlsup1 |
17 Oct 24 |                           Re: 80286 protected mode | 1 | | Tim Rentsch |
17 Oct 24 |                          Re: 80286 protected mode | 4 | | Tim Rentsch |
17 Oct 24 |                           Re: fine points of dynamic memory allocation, not 80286 protected mode | 3 | | John Levine |
17 Oct 24 |                         Re: 80286 protected mode | 3 | | George Neuner |
17 Oct 24 |                         Re: 80286 protected mode | 1 | | Tim Rentsch |
16 Oct 24 |                        Re: 80286 protected mode | 3 | | David Brown |
17 Oct 24 |                        Re: 80286 protected mode | 1 | | Tim Rentsch |
16 Oct 24 |                       Re: 80286 protected mode | 41 | | David Brown |
9 Oct 24 |                  Re: 80286 protected mode | 51 | | Thomas Koenig |
13 Oct 24 |                  Re: 80286 protected mode | 14 | | Anton Ertl |
8 Oct 24 |               Re: 80286 protected mode | 6 | | John Levine |
3 Jan 25 |             Re: Byte ordering | 154 | | Waldek Hebisch |
6 Oct 24 |         Re: Byte ordering (was: Whether something is RISC or not) | 2 | | Michael S |
3 Oct 24 |        Re: Byte ordering (was: Whether something is RISC or not) | 1 | | John Dallman |
2 Oct 24 |    Re: Whether something is RISC or not (Re: PDP-8 theology, not Concertina II Progress) | 1 | | Thomas Koenig |
2 Oct 24 |   Re: Whether something is RISC or not (Re: PDP-8 theology, not Concertina II Progress) | 5 | | David Schultz |
3 Oct 24 |   Re: Whether something is RISC or not (Re: PDP-8 theology, not Concertina II Progress) | 1 | | Lawrence D'Oliveiro |