14 Commits

Author SHA1 Message Date
Rose
3348bdd6dc Use aligned_alloc when the platform we use supports it
aligned_alloc is the preferred way to do AlignedAlloc when we can support that, with the other code being a fallback if that is not the case.
2023-12-15 14:35:28 -05:00
Guillaume Lessard
a5feb1ab6b detect failed allocations from posix_memalign
- `posix_memalign` doesn't touch its pointer-to-pointer parameter when it
  fails, so `AlignedAlloc` ended up returning stack garbage in that case.
2021-07-15 19:17:14 -06:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
Hugh Bellamy
eca5b3da34 Change _MSC_VER conditions to _WIN32 conditions in stubs 2016-12-13 14:15:39 +00:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Han Sangjin
cccfbf4d3c [swiftc/msvc] Compiling with MSVC (#1516)
Some modifications for the ms-extension option of the clang.exe in the Visual Studio 2015 development environment

This patch is only for swiftc.exe. I used the library set of Visual Studio 2015 Update 1 and recent version of swift-clang as the compiler. If you are using the real MSVC compiler, more patch might be required.
2016-07-08 19:06:10 -07:00
Saleem Abdulrasool
1aee71a4b6 Basic: support _aligned_malloc on Windows
Use `_aligned_malloc` and `_aligned_free` on Windows as it does not have the
POSIX interfaces `posix_memalign`.  `_aligned_malloc` has an associated
`_aligned_free` instead of the normal `free` call.
2016-06-17 13:34:49 -07:00
Dan Raviv
24113705fe [gardening] Minor comment fixes 2016-03-22 23:06:33 +02:00
practicalswift
1339b5403b Consistent use of header comment format.
Correct format:
//===--- Name of file - Description ----------------------------*- Lang -*-===//
2016-01-04 13:26:31 +01:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Joe Groff
9ea30d00fe Runtime: Remove custom operator new(InPlace).
C++ no longer imposes a null check requirement on placement 'new', and clang no longer emits the null check. This hack is no longer needed.
2015-11-18 12:31:24 -08:00
Joe Groff
a3b6bef4e5 Runtime: Use new(InPlace) in more places to avoid unwanted null checks. 2015-11-17 14:13:48 -08:00
Dave Abrahams
096ffc6eaf Silence warnings in the release build
Swift SVN r5950
2013-07-01 21:42:16 +00:00
Joe Groff
dbc314cdab Add a -use-malloc switch for memory debugging.
This flag makes ASTContext and SILModule's allocators go through malloc instead of using bump pointer allocators, so that GuardMalloc or similar tools can be used to look for memory bugs.

Swift SVN r5472
2013-06-04 20:35:01 +00:00