Change 14216

ShadauxCat (ShadauxCat)
ShadauxCat committed this change into //guest/ShadauxCat/Sprawl/Mainline under Review 14217
View Review
Download .zip
-Moved some global sprawl::Strings into local scope in json serialization test because of initialization order issues in the memory allocator on mac.
This is a temporary fix, and a real fix will come by making the pool allocator work in explicitly-sized pieces and putting all the code for those pieces into a cpp file.
-Fixed a large number of warnings on mac/linux that were exposed by fixes to csbuild
-Fixed compile errors on mac due to malloc and alloca not being defined, fixed by #include <stdlib.h> in appropriate places
-Fixed mac os x trying to link against pthread erroneously
-Provided os x implementation of time library
-Fixed compile errors on os x due to std::unordered_map whining about the difference between an allocator that allocates std::pair<key, value> and one that allocates std::pair<key const, value>, which, of course, is that the allocator will be no different at all.
-Fixed an actual issue where one unordered_map was allocating only key_type instead of std::pair<key_type, value_type>
-Fixed a memory leak where coroutine objects would never be cleaned up because either Yield() or reactivate_() will never return (and thus never clean up their stack memory and thus never release any dynamic memory held in stack objects) depending on the situation - if the function runs to completion, reactivate_() never returns after calling swapcontext(); meanwhile, if the function does not run to completion, Yield() never returns after calling Pause(). This behavior will need to be well-documented because it will affect client-side code as well. Stack memory within a coroutine should not rely on RAII behavior.
-Fixed compile failure when creating a StlWrapper with a const value_type

#review-14217
  • Files 15
  • Comments 0
14 edited 1 added 0 deleted
UnitTests/UnitTests_Memory.cpp#6
Loading...
UnitTests/UnitTests_Serialization.cpp#6
Loading...
collections/BitVector.hpp#6
Loading...
collections/Deque.hpp#5
Loading...
collections/Vector.hpp#6
Loading...
make.py#7
Loading...
memory/StlWrapper.hpp#2
Loading...
serialization/Replicable.hpp#2
Loading...
string/String.cpp#2
Loading...
threading/coroutine.cpp#3
Loading...
threading/coroutine.hpp#4
Loading...
threading/coroutine_linux.cpp#3
Loading...
threading/coroutine_windows.cpp#3
Loading...
threading/thread_linux.cpp#3
Loading...
time/time_osx.cpp#1
Loading...
Tip: Use n and p to cycle through the changes.