[simix] Switch to .cpp files
[SIMIX] Updated error messages for contexts The "boost" context was not mentioned in the list of existing contexts that are output when an error occurs.
Reduce the amount of implicit include directories This is intrusive to quite a lot of files, but I think that it helps making the source code more explicit about what's public and what's not.
[MSVC] correct support for thread-local storage
[mc] Fail if we can't unprotect the stack guard
[mc] Do not attempt to make the heap writeable We add a mprotect()-based gap after the stacks (which are created on the heap) in order to detect stack overflows but when the stack is destroyed, the protection is removed by making the pages (part of the heap) RW and executable. This is not a good idea :) Apparently, it fails on Ubuntu because of PaX restrictions on mprotect(): the mprotect calls fails, the pages are still unreadable and unwritable and the application segfaults when a new allocation attemps to use it.
Fix Windows build
Boost.Context context factory * This is a portable replacement for ucontext.h (makecontext, swapcontext, getcontext, setcontext) which is not in recent POSIX specs and was apparently removed from Mac OS X since 10.9. POSIX 2008 still has ucontext_t however (moved into signal.h). * Currently works only for Boost <= 1.55 (the Boost.Context API changed slightly afterwards). * Does not work with MC because we currently depend on the contexts being ucontext_t (we'd have to convert fcontext into ucontext_t). * No support for parallel execution support (yet).
Fix comment, and add a runtime warning when stack overflow protection is known to be broken. Also set default value to 0 for contexts/guard_size in this case.
Add comment to inform that stack protection is broken when PTH_STACKGROWTH == 1.
disable segv handler and guards on windows platforms
Check return value for posix_memalign.
Use context/guard_size to protect context stacks against overflow. Add a configurable number of protected pages at the top of each stack.
Add configuration parameter for contexts/guard_size.
Factorize valgrind stuff. Save valgrind_stack_id on the allocated stack.
Factorize stack creation.
No need to duplicate default value.
Change default stack size in simgrid to 8MiB. This should not really allocate the 8 MiB in RAM, thus occupating the same amount of real memory than before This behavior is at least true on Linux and BSD systems
Add/update copyright notices. All source files (C, C++, Java, Fortran, Perl, Ruby, Lua, Python, Sh) should be updated by this commit. Note however that the following directories (and their subdirectories) were not considered: ./buildtools/jenkins/ ./buildtools/pipol/ ./examples/smpi/NAS/ ./teshsuite/smpi/mpich3-test/ Use: git grep -L 'Copyright.*SimGrid' to list the files remaining without copyright notice.
Inline is overkill for this function.