# SdFat: ArduinoSdFat/libraries/SdFat/src/FreeStack.h File Reference

FreeStack.h File Reference

FreeStack() function. More...

`#include <stdint.h>`
`#include <avr/io.h>`
Include dependency graph for FreeStack.h:

## Macros

#define | HAS_UNUSED_STACK 1

## Functions

void | FillStack ()
int | FreeStack ()
int | UnusedStack ()

## Variables

char * | __brkval
char | __bss_end

## Detailed Description

FreeStack() function.

Copyright (c) 2011-2019 Bill Greiman This file is part of the SdFat library for SD memory cards.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

## Macro Definition Documentation

## HAS_UNUSED_STACK

#define HAS_UNUSED_STACK 1

Indicate FillStack() and UnusedStack() are available.

## Function Documentation

## FillStack()

void FillStack | ( |  | ) |

Fill stack with 0x55 pattern

## FreeStack()

int FreeStack | ( |  | ) |

inline

Amount of free stack space.

Returns
  The number of free bytes.

## UnusedStack()

int UnusedStack | ( |  | ) |

Determine the amount of unused stack.

FillStack() must be called to fill the stack with a 0x55 pattern.

UnusedStack() may fail if malloc() or new is use.

Returns
  number of bytes with 0x55 pattern.

## Variable Documentation

## __brkval

char* __brkval

boundary between stack and heap.

## __bss_end

char __bss_end

End of bss section.