Unix and Linux Discussions Tagged with stack |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
11 |
13,954 |
What is on Your Mind? |
|
|
|
5 |
13,611 |
Programming |
|
|
|
30 |
9,325 |
What is on Your Mind? |
|
|
|
6 |
2,731 |
Programming |
|
|
|
2 |
7,063 |
UNIX Desktop Questions & Answers |
|
|
|
0 |
1,770 |
OS X OpenSource RSS |
|
|
|
0 |
1,949 |
OS X OpenSource RSS |
|
|
|
0 |
1,629 |
OS X OpenSource RSS |
|
|
|
0 |
1,728 |
OS X OpenSource RSS |
|
|
|
0 |
1,983 |
OS X OpenSource RSS |
|
|
|
0 |
7,235 |
Software Releases - RSS News |
|
|
|
0 |
1,705 |
Software Releases - RSS News |
|
|
|
0 |
1,982 |
OS X OpenSource RSS |
|
|
|
0 |
2,650 |
OS X OpenSource RSS |
|
|
|
0 |
1,854 |
OS X OpenSource RSS |
|
|
|
0 |
893 |
Software Releases - RSS News |
|
|
|
0 |
1,174 |
Software Releases - RSS News |
|
|
|
0 |
1,693 |
OS X OpenSource RSS |
|
|
|
0 |
1,252 |
Software Releases - RSS News |
|
|
|
0 |
2,216 |
OS X OpenSource RSS |
|
|
|
0 |
1,751 |
OS X OpenSource RSS |
|
|
|
0 |
1,739 |
OS X OpenSource RSS |
|
|
|
0 |
1,847 |
UNIX and Linux RSS News |
|
|
|
0 |
1,806 |
UNIX and Linux RSS News |
|
|
|
0 |
3,457 |
HP Server News and Podcasts RSS |
|
|
|
0 |
773 |
Software Releases - RSS News |
|
|
|
0 |
3,591 |
Programming |
|
|
|
0 |
1,445 |
Software Releases - RSS News |
|
|
|
0 |
1,242 |
Software Releases - RSS News |
|
|
|
0 |
988 |
Software Releases - RSS News |
|
|
|
0 |
991 |
Software Releases - RSS News |
|
|
|
0 |
1,227 |
Software Releases - RSS News |
|
|
|
7 |
5,548 |
Programming |
|
|
|
0 |
1,563 |
Complex Event Processing RSS News |
|
|
|
0 |
1,196 |
Software Releases - RSS News |
|
|
|
0 |
1,293 |
Software Releases - RSS News |
|
|
|
0 |
1,091 |
Software Releases - RSS News |
|
|
|
0 |
1,784 |
Software Releases - RSS News |
|
|
|
5 |
10,684 |
Programming |
|
|
|
0 |
9,508 |
HP-UX |
STACK(9) BSD Kernel Developer's Manual STACK(9)
NAME
STACK -- stack macros
SYNOPSIS
#include <sys/param.h>
type
STACK_ALLOC(sp, size);
type
STACK_MAX(sp, size);
type
STACK_ALIGN(sp, bytes);
type
STACK_GROW(sp, size);
type
STACK_SHRINK(sp, size);
DESCRIPTION
A stack is an area of memory with a fixed origin but with a variable size. A stack pointer points to the most recently referenced location
on the stack. Initially, when the stack has a size of zero, the stack pointer points to the origin of the stack. When data items are added
to the stack, the stack pointer moves away from the origin.
The STACK_ALLOC() macro returns a pointer to allocated stack space of some size. Given the returned pointer sp and size, STACK_MAX() returns
the maximum stack address of the allocated stack space. The STACK_ALIGN() macro can be used to align the stack pointer sp by the specified
amount of bytes.
Two basic operations are common to all stacks: a data item is added (``push'') to the location pointed by sp or a data item is removed
(``pop'') from the stack. The stack pointer must be subsequently adjusted by the size of the data item. The STACK_GROW() and STACK_SHRINK()
macros adjust the stack pointer sp by given size.
A stack may grow either up or down. The described macros take this into account by using the __MACHINE_STACK_GROWS_UP preprocessor define.
SEE ALSO
param(3), queue(3)
BSD
April 8, 2011 BSD