mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
follow same pattern with assuming memory alignment
This commit is contained in:
parent
4fc72f8112
commit
07e5f62cab
2 changed files with 4 additions and 2 deletions
|
@ -163,7 +163,8 @@ static void *malloc_bitslice(size_t x) {
|
||||||
}
|
}
|
||||||
#define free_bitslice(x) free(x)
|
#define free_bitslice(x) free(x)
|
||||||
#else
|
#else
|
||||||
#define malloc_bitslice(x) memalign(MAX_BITSLICES / 8, (x))
|
//#define malloc_bitslice(x) memalign(MAX_BITSLICES / 8, (x))
|
||||||
|
#define malloc_bitslice(x) __builtin_assume_aligned(memalign(MAX_BITSLICES / 8, (x)), MAX_BITSLICES / 8);
|
||||||
#define free_bitslice(x) free(x)
|
#define free_bitslice(x) free(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,8 @@ static void *malloc_bitarray(size_t x) {
|
||||||
}
|
}
|
||||||
#define free_bitarray(x) free(x)
|
#define free_bitarray(x) free(x)
|
||||||
#else
|
#else
|
||||||
#define malloc_bitarray(x) memalign(__BIGGEST_ALIGNMENT__, (x))
|
//#define malloc_bitarray(x) memalign(__BIGGEST_ALIGNMENT__, (x))
|
||||||
|
#define malloc_bitarray(x) __builtin_assume_aligned(memalign(__BIGGEST_ALIGNMENT__, (x)), __BIGGEST_ALIGNMENT__);
|
||||||
#define free_bitarray(x) free(x)
|
#define free_bitarray(x) free(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue