cOMS/Stdlib/compiler.h
Dennis Eichhorn 3cd7ada19e
Some checks failed
CI / code-tests: ${{ matrix.os }} / ${{ matrix.platform }} (ubuntu-latest, x64) (push) Has been cancelled
CI / code-tests: ${{ matrix.os }} / ${{ matrix.platform }} (ubuntu-latest, x86) (push) Has been cancelled
CI / general_module_workflow_c (push) Has been cancelled
improve
2024-05-26 02:18:15 +02:00

28 lines
487 B
C

/**
* Jingga
*
* @package Stdlib
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://jingga.app
*/
#ifndef STDLIB_COMPILER_H
#define STDLIB_COMPILER_H
#ifdef _MSC_VER
void* aligned_alloc(size_t alignment, size_t size) {
return _aligned_malloc(size, alignment);
}
void aligned_free(void* ptr) {
_aligned_free(ptr);
}
#else
void aligned_free(void* ptr) {
free(ptr);
}
#endif
#endif