0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-27 08:41:02 +08:00
This commit is contained in:
Sergey Yagovtsev 2017-07-31 17:58:22 +03:00 committed by Sergey Yagovtsev
parent 39d7937397
commit 5edac7620e

View File

@ -70,6 +70,7 @@ The Apache License, Version 2.0 (the "License");
#include <sys/syscall.h>
#include <chrono>
#include <time.h>
#include <malloc.h>
#endif
#ifdef max
@ -133,9 +134,13 @@ namespace profiler {
# define EASY_MALLOC(MEMSIZE, A) _aligned_malloc(MEMSIZE, A)
# define EASY_FREE(MEMPTR) _aligned_free(MEMPTR)
# elif defined(__GNUC__)
# define EASY_ALIGNED(TYPE, VAR, A) TYPE VAR __attribute__(aligned(A))
# define EASY_ALIGNED(TYPE, VAR, A) TYPE VAR __attribute__((aligned(A)))
# define EASY_MALLOC(MEMSIZE, A) memalign(A, MEMSIZE)
# define EASY_FREE(MEMPTR) free(MEMPTR)
# else
# define EASY_ALIGNED(TYPE, VAR, A) TYPE VAR
# define EASY_MALLOC(MEMSIZE, A) malloc(MEMSIZE)
# define EASY_FREE(MEMPTR) free(MEMPTR)
# endif
#endif