Skip to content

Commit 5e6fa5e

Browse files
committed
refactor: remove Windows-specific includes and unused header
- remove conditional Windows malloc.h include - remove unused algorithm header - standardise on std::aligned_alloc/std::free for all platforms Signed-off-by: NotKeira <github.rxs06@accounts.keira.boo>
1 parent 505e8ec commit 5e6fa5e

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

src/freelist_allocator.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
#include "freelist_allocator.h"
22
#include <cassert>
3-
#include <algorithm>
4-
5-
#ifdef _WIN32
6-
#include <malloc.h>
7-
#else
83
#include <cstdlib>
9-
#endif
104

115
namespace fast_alloc
126
{
@@ -294,4 +288,4 @@ namespace fast_alloc
294288

295289
return aligned_address;
296290
}
297-
} // namespace fast_alloc
291+
} // namespace fast_alloc

src/freelist_allocator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ namespace fast_alloc
6161
std::size_t& adjustment
6262
) noexcept;
6363
};
64-
} // namespace fast_alloc
64+
} // namespace fast_alloc

0 commit comments

Comments
 (0)