Sponsored Content
Full Discussion: stack query
Top Forums Programming stack query Post 83627 by aloksave on Friday 16th of September 2005 12:04:40 PM
Old 09-16-2005
Thanks Rishi,Perderabo for ur replies
with the help of ur replies and searching on the net i now understand how stack frames are created,the sequence in which variables are pushed in...but still i have some confusions..
"When temp starts to run, it knows that d is located at (-12 + stack pointer). So it will store 10 there. The stack pointer will be in a register and there will be instructions available to load and store indexed by the register."
I still do not get that how or what (some special pointer??)acesses these local variables.what instructions do u mention?can u please explain?
may be my doubts are very silly but if u can help me understand it,i will be very grateful...
 

7 More Discussions You Might Find Interesting

1. Programming

what is stack winding and stack unwinding

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

2. Programming

Heap and stack

Hi, I have a basic doubt here. Consider the following code snippet: main() { int *a; . . } Here the memory for a gets allocated in heap or stack. (5 Replies)
Discussion started by: naan
5 Replies

3. Shell Programming and Scripting

add the output of a query to a variable to be used in another query

I would like to use the result of a query in another query. How do I redirect/add the output to another variable? $result = odbc_exec($connect, $query); while ($row = odbc_fetch_array($result)) { echo $row,"\n"; } odbc_close($connect); ?> This will output hostnames: host1... (0 Replies)
Discussion started by: hazno
0 Replies

4. Shell Programming and Scripting

Query Oracle tables and return values to shell script that calls the query

Hi, I have a requirement as below which needs to be done viz UNIX shell script (1) I have to connect to an Oracle database (2) Exexute "SELECT field_status from table 1" query on one of the tables. (3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
Discussion started by: balaeswari
6 Replies

5. Shell Programming and Scripting

Shell Script to execute Oracle query taking input from a file to form query

Hi, I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database. For instance: USER CITY --------- ---------- A CITY_A B CITY_B C ... (2 Replies)
Discussion started by: DevendraG
2 Replies

6. UNIX for Dummies Questions & Answers

Kernel Stack vs User Mode Stack

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. UNIX for Dummies Questions & Answers

What happens to the stack?

Consider this bad code, edited in Windows and run via CygWin after dos2unix so be aware of any hidden "\r" charatcers... #!/bin/bash n=0 stackit() { eval $1 if then exit 0 fi n=$ echo "$n" stackit stackit } stackit stackit Run under CygWin:- AMIGA:~> cd /tmp AMIGA:/tmp>... (2 Replies)
Discussion started by: wisecracker
2 Replies
_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.10 18 Jul 2002 _stack_grow(3C)
All times are GMT -4. The time now is 05:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy