mirror of
https://github.com/Karaka-Management/cOMS.git
synced 2026-01-11 19:28:40 +00:00
32 lines
521 B
C
32 lines
521 B
C
/**
|
|
* Jingga
|
|
*
|
|
* @copyright Jingga
|
|
* @license OMS License 2.0
|
|
* @version 1.0.0
|
|
* @link https://jingga.app
|
|
*/
|
|
#ifndef TOS_UTILS_COMPILER_H
|
|
#define TOS_UTILS_COMPILER_H
|
|
|
|
#ifdef _MSC_VER
|
|
inline
|
|
void* aligned_alloc(size_t alignment, size_t size) {
|
|
return _aligned_malloc(size, alignment);
|
|
}
|
|
|
|
inline
|
|
void aligned_free(void* ptr) {
|
|
_aligned_free(ptr);
|
|
}
|
|
#else
|
|
#include <stdlib.h>
|
|
|
|
inline
|
|
void aligned_free(void* ptr) {
|
|
free(ptr);
|
|
}
|
|
#endif
|
|
|
|
#endif
|