mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-29 05:55:30 -04:00
[misc] use the more univerasal _mm_alloc() instead of _aligned_malloc()
* Also ensure that our buffers are aligned * Also remove the use of static buffers in ms-sys
This commit is contained in:
parent
3fdf622933
commit
e76f60a3e8
11 changed files with 125 additions and 113 deletions
|
@ -256,19 +256,11 @@ static blk_t next_bad = 0;
|
|||
static bb_badblocks_iterate bb_iter = NULL;
|
||||
|
||||
static __inline void *allocate_buffer(size_t size) {
|
||||
#ifdef __MINGW32__
|
||||
return __mingw_aligned_malloc(size, BB_SYS_PAGE_SIZE);
|
||||
#else
|
||||
return _aligned_malloc(size, BB_SYS_PAGE_SIZE);
|
||||
#endif
|
||||
return _mm_malloc(size, BB_SYS_PAGE_SIZE);
|
||||
}
|
||||
|
||||
static __inline void free_buffer(void* p) {
|
||||
#ifdef __MINGW32__
|
||||
__mingw_aligned_free(p);
|
||||
#else
|
||||
_aligned_free(p);
|
||||
#endif
|
||||
_mm_free(p);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue