Matthew Parkinson
56ccd2108c
Handle exceptions and print stack traces.
2019-08-15 10:49:02 +01:00
Matthew Parkinson
f72d75ead8
Print stats on windows machines using WSL.
2019-08-15 10:49:01 +01:00
David Chisnall
d56201e28d
Add type confusion protection to the default memory provider.
2019-08-13 17:30:37 +01:00
David Chisnall
6dbe24da2e
[NFC] Replace HEADER_GLOBAL with inline (C++17).
...
HEADER_GLOBAL was using non-standard attributes to achieve what C++17
now permits with a keyword. Use the standard formulation.
Update the README to note that gcc is still not recommended, but because
of its poor codegen for 128-bit atomic compare and exchange, rather than
because it doesn't support the attribute used for HEADER_GLOBAL.
2019-08-13 17:30:37 +01:00
David Chisnall
bbf016bac8
Merge pull request #84 from microsoft/bug-fix
...
Bug fix
2019-08-13 16:57:21 +01:00
Matthew Parkinson
e9432fe9ca
Shrink reserve as failing in CI.
2019-08-13 16:31:41 +01:00
Matthew Parkinson
16b084f501
Changed abort behaviour for Windows CI.
2019-08-13 15:37:54 +01:00
David Chisnall
d2dc653af2
Make the pagemap global typed.
...
The pagemap global is now an inline static of a template class, so that
we will see different symbols for the different types.
Issue #84 showed that it's possible to compile two compilation units
with different pagemaps, link them together, and have them attempt to
interpret the global pagemap as two different types. This change should
make that impossible.
Also make the `pagemap()` function static so that it can be used from
static functions, avoiding other things that directly reference the
global pagemap.
2019-08-13 14:24:50 +01:00
Matthew Parkinson
dd3feb948c
Deal with wrap around in statistics.
2019-08-13 13:43:20 +01:00
Matthew Parkinson
bef2fb94d8
Clangformat
2019-08-13 13:27:33 +01:00
Matthew Parkinson
2ab4bb4366
Remove new from examples as they don't use it.
2019-08-13 13:04:29 +01:00
Matthew Parkinson
f545c1c790
Test for debug_check_emtpy.
2019-08-13 13:04:29 +01:00
Matthew Parkinson
e6b4efd980
Don't apply changes to GlobalPlaceholder.
2019-08-13 13:04:29 +01:00
Matthew Parkinson
cbb1063e82
Fix up checking for empty to account for stub messages.
2019-08-13 13:03:06 +01:00
Matthew Parkinson
6151b7a9b2
Make test_realloc not leak in failure case.
2019-08-13 13:03:06 +01:00
Matthew Parkinson
a32882cd55
Make malloc functional test check for leaks.
2019-08-13 13:03:06 +01:00
Matthew Parkinson
96c4acd5dd
Make all functional tests use statistics.
2019-08-13 13:03:06 +01:00
Matthew Parkinson
2efa4b14fb
Merge pull request #78 from microsoft/docs
...
[NFC] Update README to discuss porting.
2019-08-11 07:47:04 +01:00
David Chisnall
9dec0916aa
[NFC] Add NetBSD note, missing noexcept.
2019-08-02 12:26:29 +01:00
David Chisnall
b2a1f43514
[NFC] Fix typos.
2019-08-02 12:18:42 +01:00
David Chisnall
e310b49b54
[NFC] Update README to discuss porting.
2019-08-02 12:17:00 +01:00
David Chisnall
54b6e5f496
Merge pull request #77 from microsoft/pal_refactor
...
NetBSD support
2019-08-02 11:49:26 +01:00
David Chisnall
b1e4146239
Remove leftover (incorrect) conditional compilation.
2019-08-01 15:31:21 +01:00
David Chisnall
d53b110c03
Merge pull request #76 from microsoft/pal_refactor
...
Fix typo in NetBSD PAL.
2019-08-01 14:58:40 +01:00
David Chisnall
84140722fa
Fix typo in NetBSD PAL.
2019-08-01 14:57:15 +01:00
David Chisnall
b0d0f3e975
Merge pull request #75 from microsoft/pal_refactor
...
[NFC] Remove some code duplication in the PALs.
2019-08-01 13:21:03 +01:00
David Chisnall
caec12c545
Reduce the parallelism in Windows Release build tests.
...
Hopefully this will stop the CI machines from running out of memory...
2019-08-01 12:53:03 +01:00
David Chisnall
d24ad45abe
[NFC] clangformat.
2019-08-01 12:03:35 +01:00
David Chisnall
81a0f0aed8
[NFC] Remove one more unneeded include.
2019-08-01 11:50:35 +01:00
David Chisnall
d11f09e4ec
[NFC] Remove incorrect guard and some unused includes.
2019-08-01 11:50:27 +01:00
David Chisnall
896cc9cf6f
[NFC] Rename some PALs to make the naming more consistent.
2019-08-01 11:44:09 +01:00
David Chisnall
2b44b6b5ea
Add a NetBSD PAL.
...
Currently untested, but identical to the FreeBSD one so should work...
The NetBSD man pages for `madvise` and `mmap` mention the flags that we
use.
2019-08-01 11:41:08 +01:00
David Chisnall
fd88b8464b
[NFC] Separate out support for aligned allocation from the FreeBSD PAL.
...
NetBSD also supports `MAP_ALIGNED()` in `mmap` (according to the man
page, at least).
2019-08-01 11:39:26 +01:00
David Chisnall
cf6fca6514
[NFC] Make the Apple PAL use the generic BSD code.
2019-08-01 11:21:32 +01:00
David Chisnall
54cbf8b2bb
[NFC] Remove unused headers from OpenBSD PAL.
2019-08-01 11:21:28 +01:00
David Chisnall
0497993d23
Fix typo in OpenBSD PAL.
2019-08-01 11:20:05 +01:00
David Chisnall
d257f60731
[NFC] Add missing doc comments.
2019-08-01 11:03:22 +01:00
David Chisnall
4ed15def79
[NFC] Remove some code duplication in the PALs.
...
Pull out a generic POSIX PAL as a superclass for the Linux and generic
BSD PALs. Now we have FreeBSD and Linux adding OS-specific behaviour,
OpenBSD as a named subclass of the generic BSD PAL that doesn't add any
behaviour.
I believe a NetBSD PAL should now be identical to the OpenBSD one -
patches welcome if anyone wants to test one!
2019-08-01 10:56:13 +01:00
David Chisnall
5c22521ea1
Merge pull request #74 from devnexen/openbsd_support
...
Basic OpenBSD backend support.
2019-08-01 09:19:53 +01:00
David Carlier
fdae3b451f
Creating base class instead used by both platforms.
2019-07-31 10:27:35 +00:00
David Carlier
6b4ff3e7ab
Basic OpenBSD backend support.
...
Cannot enforce alignment so we just check its correctness.
2019-07-30 20:58:38 +01:00
Paul Liétar
c1a7197dd8
Merge pull request #73 from plietar/get_noncachable
...
Use get_noncachable in malloc/new overrides.
2019-07-17 16:13:17 +01:00
Paul Liétar
b2b86565db
Use get_noncachable in malloc/new overrides.
...
This may return the GlobalPlaceholder, in which case the slow path will
be used, initializing the real thread local allocator.
2019-07-17 15:41:45 +01:00
Paul Liétar
242f51eaaa
Merge pull request #72 from plietar/find-bug
...
Add remove_cache_friendly_offset calls in a few places that were missing it.
2019-07-17 14:51:23 +01:00
Paul Liétar
7047cda8ed
Fix warning about shadowing.
2019-07-17 14:13:44 +01:00
Paul Liétar
b185337c07
Specify a CMakeArgs for every matrix entry.
2019-07-17 13:54:56 +01:00
Paul Liétar
e87d184926
Remove $(CMakeOptions) that was leftover by accident.
2019-07-17 13:51:24 +01:00
Paul Liétar
a5379b24d5
Add remove_cache_friendly_offset calls in a few places that were missing it.
2019-07-17 13:14:59 +01:00
David Chisnall
ab8ec72738
Merge pull request #71 from microsoft/tls-2
...
Improved ThreadAlloc::get API
2019-07-16 11:25:27 +01:00
David Chisnall
d3f5dcefe4
Fix the libc hook.
...
Friend declarations to `extern "C"` functions must have a forward
declaration with the correct signature.
2019-07-16 10:55:29 +01:00