06-15-2019
Probably, placement has to do with word boundaries. Which vary with different OS and hardware. As Don mentioned clearly. gcc has options for packing objects in memory. try gcc -Q -v inputfilename.c - assuming that is what you used. Be prepared for a lot of information on your screen.
Last edited by jim mcnamara; 06-15-2019 at 07:46 PM..
This User Gave Thanks to jim mcnamara For This Post:
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm sorry if something like this has already been posted, but I didn't find anything like it.
I'm using ksh The code that I've come up with will initially print what I want, but will then keep repeating the second number. I'm just trying to teach myself and can't seem to find the code to work.... (16 Replies)
Discussion started by: scott78
16 Replies
2. AIX
Hi,
I'm using xterm and aixterm with Mwm on AIX, and having trouble controlling icon placement when minimising windows. Basically when I run an xterm or aixterm I want to be able to specify where the icon will be if minimised.
The man page mentions the "#geometry Geometry" option to aixterm,... (1 Reply)
Discussion started by: cunningdavid
1 Replies
3. UNIX Desktop Questions & Answers
Hi,
I'm using xterm and aixterm with Mwm on AIX, and having trouble controlling icon placement when minimising windows. Basically when I run an xterm or aixterm I want to be able to specify where the icon will be if minimised.
The man page mentions the "#geometry Geometry" option to aixterm,... (1 Reply)
Discussion started by: cunningdavid
1 Replies
4. Programming
helo can u tell me what do you mean by stack winding and stack unwinding
Regards,
Amit (2 Replies)
Discussion started by: amitpansuria
2 Replies
5. Solaris
Is it possible to place the data in inner or outer edge with SVM ( solaris volume manager ) or VxVM like we can do in AIX LVM ? (1 Reply)
Discussion started by: fugitive
1 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I am new to the linux kernel development area. I want to know what is the difference between kernel mode stack and user mode stack? Does each process has a user mode stack and a kernel mode stack?? Or Each process has a user mode stack and there is only one kernel mode stack that is shared by... (4 Replies)
Discussion started by: saurabhkoar
4 Replies
7. Cybersecurity
I have been asked to place 2 (1 NTOP & 1 SNORT) boxes within our network as part of our tool kit for network monitoring and Intrusion detection. Out network is very simplistic and it layed out like this:
internet
|
|
Cisco 1811 Router (8x Layer 2 switch ports)
... (0 Replies)
Discussion started by: metallica1973
0 Replies
8. UNIX for Advanced & Expert Users
Hi, I am programming in kernel, and I want to use a double linked list that holds infos that every process could access and modify THIS list. So, I suppose it is a 'global' variable since every process(thread) can reach it, I am wondering where to put it? by changing some of the kernel files? (1 Reply)
Discussion started by: louisTan
1 Replies
LEARN ABOUT OPENSOLARIS
_stack_grow
_stack_grow(3C) Standard C Library Functions _stack_grow(3C)
NAME
_stack_grow - express an intention to extend the stack
SYNOPSIS
#include <ucontext.h>
void *_stack_grow(void *addr);
DESCRIPTION
The _stack_grow() function indicates to the system that the stack is about to be extended to the address specified by addr. If extending
the stack to this address would violate the stack boundaries as retreived by stack_getbounds(3C), a SIGSEGV is raised.
If the disposition of SIGSEGV is SIG_DFL, the process is terminated and a core dump is generated. If the application has installed its own
SIGSEGV handler to run on the alternate signal stack, the signal information passed to the handler will be such that a call to stack_viola-
tion(3C) with these parameters returns 1.
The addr argument is a biased stack pointer value. See the Solaris 64-bit Developer's Guide.
This function has no effect if the specified address, addr, is within the bounds of the current stack.
RETURN VALUES
If the _stack_grow() function succeeds and does not detect a stack violation, it returns addr.
ERRORS
No errors are defined.
USAGE
The _stack_grow() function does not actually adjust the stack pointer register. The caller is responsible for manipulating the stack
pointer register once _stack_grow() returns.
The _stack_grow() function is typically invoked by code created by the compilation environment prior to executing code that modifies the
stack pointer. It can also be used by hand-written assembly routines to allocate stack-based storage safely.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |Async-Signal-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
stack_getbounds(3C), stack_inbounds(3C), stack_violation(3C), attributes(5)
Solaris 64-bit Developer's Guide
SunOS 5.11 18 Jul 2002 _stack_grow(3C)