1
0

alloca.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*++
  2. Copyright (c) 2013 Minoca Corp.
  3. This file is licensed under the terms of the GNU Lesser General Public
  4. License version 3. Alternative licensing terms are available. Contact
  5. info@minocacorp.com for details.
  6. Module Name:
  7. alloca.h
  8. Abstract:
  9. This header contains definitions for the automatic allocation routine.
  10. Author:
  11. Evan Green 2-Aug-2013
  12. --*/
  13. #ifndef _ALLOCA_H
  14. #define _ALLOCA_H
  15. //
  16. // ------------------------------------------------------------------- Includes
  17. //
  18. #include <libcbase.h>
  19. #include <stddef.h>
  20. //
  21. // --------------------------------------------------------------------- Macros
  22. //
  23. #define alloca(_Size) __builtin_alloca(_Size)
  24. //
  25. // ---------------------------------------------------------------- Definitions
  26. //
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30. //
  31. // ------------------------------------------------------ Data Type Definitions
  32. //
  33. //
  34. // -------------------------------------------------------------------- Globals
  35. //
  36. //
  37. // -------------------------------------------------------- Function Prototypes
  38. //
  39. LIBC_API
  40. void *
  41. _alloca (
  42. int Size
  43. );
  44. /*++
  45. Routine Description:
  46. This routine allocates temporary space on the stack. This space will be
  47. freed automatically when the function returns.
  48. Arguments:
  49. Size - Supplies the number of bytes to allocate.
  50. Return Value:
  51. None.
  52. --*/
  53. #ifdef __cplusplus
  54. }
  55. #endif
  56. #endif