0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-27 00:31:02 +08:00

Merge pull request #74 from rationalcoder/develop

Fixed Issue #73. Added #include <malloc.h> to fix EASY_ENABLE_ALIGNMENT build error
This commit is contained in:
Sergey Yagovtsev 2017-10-23 22:59:25 +04:00 committed by GitHub
commit de6b6c82b5

View File

@ -64,6 +64,8 @@ The Apache License, Version 2.0 (the "License");
# define EASY_MALLOC(MEMSIZE, A) malloc(MEMSIZE)
# define EASY_FREE(MEMPTR) free(MEMPTR)
#else
// MSVC and GNUC aligned versions of malloc are defined in malloc.h
# include <malloc.h>
# if defined(_MSC_VER)
# define EASY_ALIGNED(TYPE, VAR, A) __declspec(align(A)) TYPE VAR
# define EASY_MALLOC(MEMSIZE, A) _aligned_malloc(MEMSIZE, A)