Changeset View
Changeset View
Standalone View
Standalone View
runtime/src/kmp_wrapper_malloc.h
Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | |||||
#include <stdlib.h> | #include <stdlib.h> | ||||
#include "kmp_os.h" | #include "kmp_os.h" | ||||
// Include alloca() declaration. | // Include alloca() declaration. | ||||
#if KMP_OS_WINDOWS | #if KMP_OS_WINDOWS | ||||
#include <malloc.h> // Windows* OS: _alloca() declared in "malloc.h". | #include <malloc.h> // Windows* OS: _alloca() declared in "malloc.h". | ||||
#define alloca _alloca // Allow to use alloca() with no underscore. | #define alloca _alloca // Allow to use alloca() with no underscore. | ||||
#elif KMP_OS_FREEBSD || KMP_OS_NETBSD | #elif KMP_OS_DRAGONFLY || KMP_OS_FREEBSD || KMP_OS_NETBSD | ||||
// Declared in "stdlib.h". | // Declared in "stdlib.h". | ||||
#elif KMP_OS_UNIX | #elif KMP_OS_UNIX | ||||
#include <alloca.h> // Linux* OS and OS X*: alloc() declared in "alloca". | #include <alloca.h> // Linux* OS and OS X*: alloc() declared in "alloca". | ||||
#else | #else | ||||
#error Unknown or unsupported OS. | #error Unknown or unsupported OS. | ||||
#endif | #endif | ||||
/* KMP_SRC_LOC_DECL -- Declaring source location paramemters, to be used in | /* KMP_SRC_LOC_DECL -- Declaring source location paramemters, to be used in | ||||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |