summaryrefslogtreecommitdiffstats
path: root/libcxx/test/utilities/memory
Commit message (Collapse)AuthorAgeFilesLines
* [tests] One last batch of XFAILs, for tests using new symbols added to libc++.Daniel Dunbar2013-02-0610-0/+50
| | | | | | | - As of this commit, the test suite should now fully pass on both darwin11 and darwin12 when testing against either a locally built libc++ or the system libc++. llvm-svn: 174478
* Andrew Morrow: There are two tests under test/utilities/memory that heap ↵Howard Hinnant2012-08-022-4/+0
| | | | | | | | | | | | | allocate two integers which remain unused and are subsequently leaked, so the test fail when run under valgrind. Unless I'm overlooking a subtle reason why they are needed I think they can be removed, allowing these tests to pass under valgrind. The attached patch removes the variables. If there is a reason for them to exist, I can change this to just delete them at the end of the test. llvm-svn: 161195
* Implement [util.smartptr.shared.atomic]. This is the last unimplementedHoward Hinnant2012-07-3011-0/+409
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | section in libc++. This requires a recompiled dylib. Failure to rebuild the dylib will result in a link-time error if and only if the functions from [util.smartptr.shared.atomic] are used. The implementation is not lock free. After considerable thought, I know of no way to make the implementation lock free. Ideas welcome along that front. But changing the ABI of shared_ptr is not on the table at this point. The mutex used to lock these function is encapsulated by std::__sp_mut. The only thing the client knows about std::__sp_mut is that it has a void* data member, can't be constructed, and has lock and unlock members. Within the binary __sp_mut is currently implemented as a pointer to a std::mutex. That can change in the future without disturbing the ABI (as long as sizeof(__sp_mut) remains constant. I specifically did not make __sp_mut a spin lock as I have a pathological distrust of spin locks. Testing on OS X reveals that the use of std::mutex in this role is not a large performance penalty as long as the contention for the mutex is low (more likely to get the lock than to have to wait). In the future we can still make __sp_mut a spin lock if that is what is desired (without ABI damage). The dylib contains 16 __sp_mut's to be chosen based on the hash of the address of the shared_ptr. The constant 16 is a ball-park reasonable space/time tradeoff. std::hash<T*> was changed to call __murmur2_or_cityhash, instead of the identity function. I had thought we had already done this, but I was mistaken. All of this is under #if __has_feature(cxx_atomic) even though the implementation is not lock free, because the signatures require access to std::memory_order, which is currently available only under __has_feature(cxx_atomic). llvm-svn: 160940
* Modernize relational operators for shared_ptr and unique_ptr. This includes ↵Howard Hinnant2012-02-212-0/+142
| | | | | | adding support for nullptr, and using less<T*>. Fixes http://llvm.org/bugs/show_bug.cgi?id=12056. llvm-svn: 151084
* Exercise rvalue arguements to make_shared for C++11 mode.Howard Hinnant2012-02-181-0/+11
| | | | llvm-svn: 150887
* Adjust two tests to account for a nasty change in copying behaviorAlexis Hunt2011-07-184-0/+18
| | | | | | | between C++03 and C++0x and its effect on exceptions, and another two to not test move construction when rvalue references are not available. llvm-svn: 135445
* Corrected some bugs in both memory and the tests. Preparing for being able ↵Howard Hinnant2011-05-112-5/+5
| | | | | | to turn on support for alias templates. llvm-svn: 131199
* LWG 1339Howard Hinnant2010-11-181-2/+3
| | | | llvm-svn: 119699
* LWG 1404Howard Hinnant2010-11-182-2/+48
| | | | llvm-svn: 119609
* license changeHoward Hinnant2010-11-16288-576/+576
| | | | llvm-svn: 119395
* sync with N3126Howard Hinnant2010-09-0520-1431/+0
| | | | llvm-svn: 113100
* Changed __config to react to all of clang's currently documented has_feature ↵Howard Hinnant2010-09-0430-122/+122
| | | | | | flags, and renamed _LIBCPP_MOVE to _LIBCPP_HAS_NO_RVALUE_REFERENCES to be more consistent with the rest of the libc++'s flags, and with clang's nomenclature. llvm-svn: 113086
* Fixing whitespace problemsHoward Hinnant2010-08-22304-309/+15523
| | | | llvm-svn: 111767
* US 108, N3109Howard Hinnant2010-08-211-1/+1
| | | | llvm-svn: 111747
* US 107Howard Hinnant2010-08-1919-19/+19
| | | | llvm-svn: 111538
* [util.smartptr.hash]Howard Hinnant2010-06-032-0/+2
| | | | llvm-svn: 105393
* Wiped out some non-ascii characters that snuck into the copyright.Howard Hinnant2010-05-11305-305/+305
| | | | llvm-svn: 103516
* libcxx initial importHoward Hinnant2010-05-11307-0/+1976
llvm-svn: 103490
OpenPOWER on IntegriCloud