Commit Graph

15 Commits

Author SHA1 Message Date
Andrew Trick
29e840e8fe Fix ManagedBuffer test, extend variable lifetime. 2021-03-02 22:20:13 -08:00
3405691582
cd7570fdee ManagedBuffer capacity is unavailable on OpenBSD.
On OpenBSD, malloc introspection (e.g., malloc_usable_size or
malloc_size) is not provided by the platform allocator. Since allocator
introspection is currently a load-bearing piece of functionality for
ManagedBuffer and ManagedBufferPointer, pending any API changes, as a
stopgap measure, this commit marks methods in ManagedBuffer and
ManagedBufferPointer calling _swift_stdlib_malloc_size and methods
dependent thereon unavailable on OpenBSD.

This may induce some compatibility issues for some files, but at least
this change ensures that we can get stdlib to build on this platform
until the evolution process addresses this problem more thoroughly.
2020-09-09 18:57:58 -04:00
Ben Cohen
eb083ce84d Revert "implement ManagerBuffer.reallocated to allow realloc'ing the storage" (#21874)
* Revert "implement ManagerBuffer.reallocated to allow realloc'ing the storage"
2019-01-16 10:22:58 -08:00
Johannes Weiss
2d9fa20c6b implement ManagerBuffer.reallocated to allow realloc'ing the storage 2018-11-08 18:18:23 +00:00
taylor swift
c85880899d implement SE 184: add allocation methods to Unsafe buffer pointers, drop all parameters from deallocation, adjust namings, and add repeated-value assignment methods 2017-11-17 21:28:03 -08:00
Roman Levenstein
057982c367 Fix the test by removing a system-dependent check
The removed check was dependent on the malloc implementation of the target operating system, because it asks for a real size of the allocated memory block. Usually, there is only a minor over-allocation due to the way how most malloc implementations work. But this is not guaranteed to hold for any malloc implementation.

rdar://problem/32315336
2017-05-22 00:33:17 -07:00
Mishal Shah
bed71a1d09 Disable stdlib/ManagedBuffer.swift for Linux <rdar://problem/32315336> 2017-05-20 22:09:17 -07:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01: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
Max Moiseev
9fc37efee4 [test] renaming test/1_stdlib to just test/stdlib 2016-09-01 16:51:43 -07:00
Jordan Rose
e83c117c30 [test] Hack: run stdlib tests first to start long-running tests earlier.
This decreases total testing time by over a minute on my old Mac Pro.
It probably has much less effect on systems with fewer cores, but shouldn't
be any worse there.

Swift SVN r22745
2014-10-15 01:30:51 +00:00
Dmitri Hrybenko
fea5de2fc8 stdlib and runtime: coding style fixes
Swift SVN r22685
2014-10-11 01:40:57 +00:00
Dave Abrahams
5c33278e63 [stdlib] Add ManagedBufferPointer
A revamped version of HeapBuffer that doesn't allow null buffer
references.  Something like this is needed for killing the null array
state.

Swift SVN r22683
2014-10-11 01:10:38 +00:00
Dave Abrahams
74e27aaab1 [stdlib] uniqueness checking for users
Make unique reference checking available to users, making ManagedBuffer
a complete facility for building COW value types.  Also rationalize the
way we name and organize the runtime primitives we ultimately call.

Swift SVN r22594
2014-10-08 04:48:52 +00:00
Dave Abrahams
43deddf8ac [stdlib] Move ManagedBuffer prototype into stdlib
...in preparation to use it in _[Contiguous]ArrayBuffer

Swift SVN r22440
2014-10-01 21:12:43 +00:00