2ef012e47441428f752c6a29d2927513669dda30 |
|
08-Apr-2014 |
Dan Albert <danalbert@google.com> |
Get libc++ building for Android This adds an Android makefile, aliases locale aware cctype and cwctype functions, fixes broken configuration in libcxx, and stubs functions missing from bionic. Change-Id: I247372d87caabe0310bedc4540b68ab2ed1986c1
/external/libcxx/src/memory.cpp
|
4c6acb5ecd7fab26583353261fd52a9f7ba2f1e0 |
|
04-Jan-2014 |
Joerg Sonnenberger <joerg@bec.de> |
Switch to using C++ style casts. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@198505 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/memory.cpp
|
e33c2d1926f49221c9d72a353d797d135a810d77 |
|
16-Mar-2013 |
Howard Hinnant <hhinnant@apple.com> |
This should be nothing but a load-time optimization. I'm trying to reduce load time initializers and this is a big one. No visible functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177212 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/memory.cpp
|
9c0df1416f2cec1cc6cce797d18ddc5e50b64797 |
|
30-Oct-2012 |
Howard Hinnant <hhinnant@apple.com> |
Rename uses of _ and __ because these are getting stepped on by macros from other system code. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@167038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/memory.cpp
|
96c60b482ef2614185e3fa0c606f87c3efcf1e85 |
|
19-Aug-2012 |
Howard Hinnant <hhinnant@apple.com> |
Patch contributed by Dev Dude for mingw64 port. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@162188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/memory.cpp
|
65f059b842cc5b7990933781e119a5f14abc3504 |
|
30-Jul-2012 |
Howard Hinnant <hhinnant@apple.com> |
Despite my pathological distrust of spin locks, the number just don't lie. I've put a small spin in __sp_mut::lock() on std::mutex::try_lock(), which is testing quite well. In my experience, putting in a yield for every failed iteration is also a major performance booster. This change makes one of the performance tests I was using (a highly contended one) run about 20 times faster. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/memory.cpp
|
5fec82dc0db3623546038e4a86baa44f749e554f |
|
30-Jul-2012 |
Howard Hinnant <hhinnant@apple.com> |
Implement [util.smartptr.shared.atomic]. This is the last unimplemented 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). git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160940 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/memory.cpp
|
46e9493c687004357f757d08335c3ec411a361fd |
|
07-Jul-2012 |
Howard Hinnant <hhinnant@apple.com> |
Appy constexpr to <memory>. Picked up a few missing noexcepts as well. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@159902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/memory.cpp
|
5586c020c9b9819062306522b76b09561d91d50e |
|
27-Dec-2011 |
Howard Hinnant <hhinnant@apple.com> |
Fix memory leak in converting weak_ptr to shared_ptr git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@147298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/memory.cpp
|
ec3773c2dadbeadfc5def927116c2ee9d9c53066 |
|
01-Dec-2011 |
Howard Hinnant <hhinnant@apple.com> |
Quash a whole bunch of warnings git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145624 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/memory.cpp
|
1694d23e23d41c4037111d96324c0c16c744c09d |
|
28-May-2011 |
Howard Hinnant <hhinnant@apple.com> |
noexcept for <memory>. I've added a few extension noexcept to: allocator_traits<A>::deallocate, allocaate<T>::deallocate, return_temporary_buffer, and default_delete<T>::operator()(T*) const. My rationale was: If a std-dicated noexcept function needs to call another std-defined function, that called function must be noexcept. We're all a little new to noexcept, so things like this are to be expected. Also included fix for broken __is_swappable trait pointed out by Marc Glisse, thanks Marc|. And fixed a test case for is_nothrow_destructible. Destructors are now noexcept by default| git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132261 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/memory.cpp
|
b64f8b07c104c6cc986570ac8ee0ed16a9f23976 |
|
16-Nov-2010 |
Howard Hinnant <hhinnant@apple.com> |
license change git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/memory.cpp
|
28dbbe0596878c12e13507aad6b40d33e5a8fa20 |
|
16-Nov-2010 |
Howard Hinnant <hhinnant@apple.com> |
Dave Zarzycki showed how the efficiency of shared_ptr could be significantly increased. The following program is running 49% faster: #include <iostream> #include <memory> #include <chrono> #include <vector> #include "chrono_io" int main() { typedef std::chrono::high_resolution_clock Clock; Clock::time_point t0 = Clock::now(); { std::shared_ptr<int> p(new int (1)); std::vector<std::shared_ptr<int> > v(1000000, p); v.insert(v.begin(), p); v.insert(v.begin(), p); v.insert(v.begin(), p); v.insert(v.begin(), p); } Clock::time_point t1 = Clock::now(); std::cout << (t1-t0) << '\n'; } git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/memory.cpp
|
16e6e1d72fd6a10fc165eba4ca4ed2fa7c45df78 |
|
22-Aug-2010 |
Howard Hinnant <hhinnant@apple.com> |
Fixing whitespace problems git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@111751 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/memory.cpp
|
d444470d6cd1cad554139c4ba7f3c4f3fe921a5d |
|
11-Aug-2010 |
Howard Hinnant <hhinnant@apple.com> |
now works with -fno-exceptions and -fno-rtti git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@110828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/memory.cpp
|
adff4895b2746f30b271bc219713e7ded5ae9677 |
|
24-May-2010 |
Howard Hinnant <hhinnant@apple.com> |
patch by Jeffrey Yasskin for porting to Ubuntu Hardy. Everything was accepted except there were some bug fixes needed in <locale> for the __nolocale_* series. For the apple branch I ended up using templates instead of the var_args solution because it seemed both safer and more efficient. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@104516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/memory.cpp
|
f5256e16dfc425c1d466f6308d4026d529ce9e0b |
|
11-May-2010 |
Howard Hinnant <hhinnant@apple.com> |
Wiped out some non-ascii characters that snuck into the copyright. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@103516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/memory.cpp
|
bc8d3f97eb5c958007f2713238472e0c1c8fe02c |
|
11-May-2010 |
Howard Hinnant <hhinnant@apple.com> |
libcxx initial import git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@103490 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/src/memory.cpp
|