answersLogoWhite

0

Search results

On a near call, the stack pointer is 2 less than its original value. On a far call, it is 4 less.

1 answer





Still have questions?
magnify glass
imp


Arguments are passed to functions via the thread's function call stack. Every thread has its own call stack, which is a small region of contiguous, fixed-size memory that extends downwards into lower addresses. The stack is allocated when the thread is instantiated and deallocated when the thread terminates thus there is minimal cost in using the stack. Data is pushed and popped from the stack while a stack pointer keeps track of the top of the stack (the lowest unused address).

1 answer


A stack is a last in first out (LIFO) data structure. Stacks are typically used in backtracking algorithms where values are popped off the stack in the reverse order they were pushed onto the stack. Procedural programming languages make use of a call stack so that functions can easily return control to their callers -- which is vital when a function may have more than one call site. The calling function pushes the return address onto the call stack and then passes control to the callee function. When the callee has finished its task, the return address is popped off the stack and control returned to that address. In this way, functions can call other functions (including themselves) without losing track of where those calls came from. The call stack is also used to store a function's local variables as well as any arguments that were passed to the function by its caller. The function's exception handlers can also be placed on the stack. When an unhandled exception occurs, the call stack unwinds until a stack frame with a suitable exception handler is located. If the call stack unwinds all the way to the program's entry point (the main function) and there is still no handler, the program terminates with an unhandled exception error.

1 answer


Calling an in-line function, which is not actually a function-call.

1 answer


The recursive implementation of quicksort requires O(log n) of additional space because it uses the call stack to keep track of subarrays being sorted. Each recursive call adds a new frame to the call stack, and the maximum depth of the call stack is O(log n) in the average case.

1 answer


Recursive function call depend your primary memory space because the recursive call store in stack and stack based on memory.

3 answers



Without seeing the code it is impossible to say, however the error indicates the code has caused a stack overflow and that typically indicates a recursive function that either has no end-point or has an end-point that exceeds the limits of the call stack. Either that or you have attempted to allocate memory upon the stack when there is insufficient unused memory available on the stack.

The call stack is a fixed length memory allocation used to store thread-local variables, return addresses and formal arguments. Every thread of execution has its own call stack, but once a stack is exhausted or there is insufficient space to meet an allocation at runtime, the thread cannot proceed and thus terminates with a segmentation fault.

1 answer


According to the Black Ops II multiplayer trailer, Scorestreaks will not stack, however they can keep going after you get all your Scorestreaks, similat to Call of Duty Modern Warfare 3.

1 answer


A collection of stones is often referred to as a pile, heap, or stack.

1 answer


25 sheets of paper is called a quire

1 answer


The noun 'stack' is a standard collective noun for:

  • a stack of books
  • a stack of cars
  • a stack of dishes
  • a stack of hay
  • a stack of librarians
  • a stack of pancakes
  • a stack of planes
  • a stack of plates
  • a stack of suitcases
  • a stack of wood

13 answers


The calling code pushes the return address onto the call stack. When the function returns, it pops the return address off the call stack and returns control to that address. The call stack (or simply the stack), is also used to pass parameters to functions and to receive return values from functions, as well as for local storage, evaluation, and the this pointer when calling class member functions. Functions that call other functions, or that recursively call themselves, will increase consumption of the call stack accordingly. This is known as winding, because the return addresses will remain on the stack until the function is ready to return (even if the function calls itself or another function), thus allowing functions to automatically unwind. In other words, it's a bit like leaving a trail of breadcrumbs (as per the Hansel & Gretel fairytale) allowing functions to retrace their steps back to the original call site and, ultimately, back to the main function.

1 answer



It will not be released until they have decided what to call it :P

1 answer


Yes, any body can explain stack level functioning of recursion in C language exclusively. ;-)

Whenever we invoke a function, the return address is pushed onto the call stack. That return address remains on the call stack until the function returns at which point the address is popped from the stack and control passed to that address. In this way, functions can always find their way back to their callers, even if those functions invoke other functions, including themselves (recursive functions).

As well as the return address, the formal arguments of the function and the local variables of the function are also pushed onto the stack. Formal arguments are initialised by the actual arguments passed by the caller, assigning the values of the actual arguments to the formal arguments. If the formal argument is a pointer variable or reference, the address of the actual argument is passed instead.

In addition, the call stack is used by the exception handling mechanism. When an exception is thrown by a function, the call stack "unwinds" (popping each function's stack frame) until a suitable handler is found.

1 answer


there is no a prior limit on the depth of nested recursive calls (that a recursive function may call itself any no. of times), we may need to save an arbitrary number of register values(return values of the recursive functions, that may be used latter to find the actual solution). These values must be restored in the reverse of the order in which they were saved, since in a nest of recursions the last subproblem to be entered is the first to be finished. This dictates the use of a stack, or ``last in, first out'' data structure, to save register values. We can extend the register-machine language to include a stack by adding two kinds of instructions: Values are placed on the stack using a save instruction and restored from the stack using a restore instruction. After a sequence of values has been saved on the stack, a sequence of restores will retrieve these values in reverse order.

Vishal Srivastava

MCA, LU

source : http://mitpress.mit.edu/sicp/full-text/sicp/book/node110.html

4 answers


The stack register points to the top of the stack for the currently executing thread. The stack is a fixed-length memory allocation at the bottom of addressable memory (highest available address). The stack extends upwards into lower addresses. To keep track of the stack's usage, the stack pointer marks the top of the stack where a new frame will be pushed, decrementing the stack pointer by the required amount. When a frame is popped, the stack pointer is incremented by the frame length. The stack is typically used to call and return from functions by storing the return address of the caller, but can also be used to store a function's arguments (the values passed to it by its caller), its local variables and its exception handlers. Since the memory is allocated as soon as the thread becomes active, moving a pointer to activate and release stack frames is much quicker than requesting heap memory via the operating system.

1 answer


A big group of books is called a library.
I call a group of books a group of books.

4 answers


A pile of hay may be called a :

  • haystack
  • haymow
  • hayrick
  • haycock
  • hay-pile
  • hay stook

hay bale

3 answers


An activation record is a data structure containing subroutine state information located on the call stack.

1 answer


A type of RAM that is organized as a stack. or part of RAM that has software to make it operate like a stack. A stack memory operates like one of those chip dispensers they use in Los Vegas. You push the chips onto the stack. When you remove one (called a pop), it was the one on the top, the last one you put in. The first one you put in is the last one you take out. They are used by certain types of computer hardware and software that needs data accessed in that way, FILO (first in last out) and LIFO (last in first out). For example subroutine return addresses. When the CPU executes a subroutine call, the return address is pushed on the stack. The subroutine may call another subroutine, with another return address pushed on the stack. And more. then when the subroutines are exited, the addresses are POPed off the stack and executed. The use of a stack ensures the returns are all executed in the correct order.

1 answer


Usually a group of paper is called a ream. This would be around 500 sheets. Otherwise it is referred to as a stack of paper.

3 answers


The band individually met on a train to 'Hunter School of Performing Arts' in New Castle, NSW in 2002. They started talking and eventually decided to make a band and call it 'Short Stack'

1 answer


A stack created by the user or a programmer is an implicit stack

1 answer


A stack can be used to implement a subroutine call because the return address is pushed onto the stack, and control transfers to the subroutine. If the subroutine were to then call another subroutine, or even itself, a second return address would be pushed. When the subroutine returns control, the return address is popped off of the stack and control transfers to the return address.

In addition, the stack can be used to pass arguments. The caller can push the arguments onto the stack before calling the subroutine. The subroutine can then access the arguments by making references relative to the stack pointer. When the subroutine returns control, the caller then pops the arguments off of the stack.

Further, the subroutine can use the stack to store local variables. It adjusts the stack pointer in the direction of pushing things onto the stack, and then make references to that region of memory between the original value of the stack pointer and the new value of the stack pointer.

This is exactly how most subroutines work on the 8086/8088 (and higher) processors...

  • The caller pushes arguments on the stack
  • The caller calls the subroutine, pushing the return address on the stack
  • The subroutine pushes caller registers onto the stack, if that is the agreed convention for that call
  • The subroutine pushes the BP register on the stack and then copies the stack pointer (SP) to BP
  • The subroutine adjusts SP downward, allocating the required local memory
  • The subroutine accesses arguments with [BP+offset] addressing
  • The subroutine accesses local variables with [BP-offset] addressing
  • When the subroutine is done, it sets SP back to BP, pops caller's registers off of the stack, pops caller's return address off of the stack, and then returns to the caller
  • The caller then pops the arguments off of the stack.

The structure in memory, representing arguments, return address, saved registers if needed, and local variables, with BP in the center, is called a stack frame.

Done properly, a subroutine can be fully recursive, even able to call itself, or be called by other threads, because all local variables and the registers if saved are stored on the stack. The ability to be recursive is also called reentrancy.

1 answer


4 states for opcode fetch and decode 3 states for each byte to retrieve the target (call) address 3 states for each byte of PC to push on the stack 1 state for each decrement of the stack pointer

1 answer


Inline functions are just that, they are "inline", which means that the compiler injects the body of the function declaration into (inline to) the text segment without generating the actual call sequence. Without the call sequence, there is no stack frame, so there are no local variables. Without local variables or the stack frame, there can be no recursion.

1 answer


The sle stack, also known as the call stack, is crucial in software development and debugging because it keeps track of the order in which functions are called and helps identify where errors occur in the code. By examining the stack, developers can trace the flow of the program and pinpoint the source of bugs, making it easier to fix issues and improve the overall quality of the software.

1 answer


Stack pointer points to the topmost / most recently referenced location on the stack;

- Nutan

2 answers


Advantages (Pros)

* Easy to get started

* Low Hardware Requirement

* Cross- Platform

* Anyone with access can edit the program

Disadvantages (Cons)

* Inflexible

* Lack of scalability

* Unable to Copy & Paste

7 answers


This probably means that the stack ran out of memory when the program reached line 1776. This is in many cases caused by a function that calls itself too many times, since each function call takes up memory on the stack and that memory is not returned until the function exits.

1 answer


$1000 in a stack

1 answer


Stack these boxes over there, please.

There was a stack of cards sitting on the table.

2 answers


Gael Stack has written:

'Gael Stack'

'Gael Stack' -- subject(s): Themes, motives

1 answer


It depends on the type of architecture and controller u use. It can be found in the instruction set documentation. It requires 18 cycles on the Intel 8085.

How_many_machine_cycles_require_for_call_instruction_in_8085

2 answers


The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with five operations that allow a vector to be treated as a stack. The usual push and pop operations are provided, as well as a method to peek at the top item on the stack, a method to test for whether the stack is empty, and a method to search the stack for an item and discover how far it is from the top.

When a stack is first created, it contains no items.

Methods:

  • empty() - Returns boolean - Used to check if the stack is empty
  • peek() - Returns Object - Take a look at the top most element in the stack without popping it
  • Pop() - Returns Object - Returns the top most element from the stack
  • push(Object o) - Pushes the object at the top of the stack
  • search(Object o) - Returns int - Returns the index location of the searched object. Returns -1 if the object is not found.

Stack is a data structure it allows data to be inserted and removed in a push and a pop operation . stack also support a peek operation which reads data without removing it. A stack is a LIFO-queue, meaning that the last data to be inserted will be the first data to be removed

7 answers


A stack is a data structure in which last item inserted is taken out first . That's why they are known as LIFO (last in first out). Inserting an item in stack is termed as push and taking an item out from stack I s termed as pop. Stack pointer is the pointer that points to the top of the stack or that points the item at the top of the stack and help in adding or deleting the item from the top of stack.

2 answers


He and Andy share a 2 year old brother call christerpher

1 answer



A stack is a data structure in which last item inserted is taken out first . That's why they are known as LIFO (last in first out). Inserting an item in stack is termed as push and taking an item out from stack I s termed as pop. Stack pointer is the pointer that points to the top of the stack or that points the item at the top of the stack and help in adding or deleting the item from the top of stack.

1 answer


Presumably you are referring to the next unused element of an array. If your array contains unused elements then it is up to you, the programmer, to keep track of them. Typically you will do this by placing all unused elements at the end of the array. Knowing the array's overall capacity (in elements) and the number of elements that are currently in use, it is trivial to compute the address of the next free element; there is no need to maintain a separate pointer.

Perhaps you are referring to the (call) stack pointer. Call stacks are defined by the system. In 8086 architecture, the call stack is a fixed-length region of contiguous memory addresses allocated to a thread (every thread has its own call stack). The call stack extends downwards into lower memory addresses. The stack pointer (SP) register refers to the last element pushed onto the stack (the lowest used address). Note that it cannot possibly refer to the next unused element given that the length of an unused element cannot be determined until an element is actually pushed onto the stack. That is, if the element being pushed were 2 addresses (or bytes) in length, the SP will be decremented by 2 addresses and the new element will be placed at the new address. When we subsequently pop that element, the SP is simply incremented by 2 addresses.

1 answer


Stack in Ilocano is "pundar".

1 answer


Taylor Stack's birth name is Taylor Burns Stack.

1 answer


XTHL instruction exchanges the contents of H-L register pair with the contents of the stack pointer (SP). SPHL instruction loads the HL register pair with the address contained in the stack pointer (SP), where SPHL = HL ← SP.

2 answers


Call-stacks are fixed-length and are allocated on a per-thread basis as threads are instantiated. The stack pointer CPU register keeps track of the next available address in the current thread's stack. The compiler computes the length of a function according to the number and type of its local variables (including formal arguments) plus the return address. When the function is invoked, the current stack pointer is adjusted by this amount, creating a "stack frame" specific to that function. Given the start address of the stack frame, the local variables and formal arguments can be referred to via constant offsets within the stack frame. When the function returns, the stack pointer is readjusted, effectively freeing the memory without actually releasing it back to the system. In this way, memory can be allocated and released on the stack with minimum cost.

1 answer