mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-27 00:31:02 +08:00
fix #51
This commit is contained in:
parent
39d7937397
commit
5edac7620e
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user