Matthew Parkinson
74cc475787
Code review feedback.
2019-11-14 13:34:57 +00:00
Matthew Parkinson
14383614e0
Clang tidy
2019-11-14 13:04:24 +00:00
Matthew Parkinson
c2799f6ec8
Make debug_check_empty not use statistics
...
Debug_check_empty now empties the free lists, and checks it empties all the
queues in the allocator. This does not require statistic tracking to
work anymore.
This additionally can check internal regression that cause leaks that
are not the clients fault.
2019-11-14 12:55:23 +00:00
Matthew Parkinson
23b4230f6a
Fixed leak in free list.
...
If the first call to alloc uses the minimum size class, then we end up
leaking a whole page of allocations. We fill the small_fast_free_list,
in a call to build the message_queue. But this means the
small_fast_free_list[0] is not empty. But the code was staying on the
slow path, and overwriting it.
2019-11-14 12:50:53 +00:00
Matthew Parkinson
d0a9633421
Merge pull request #95 from microsoft/minor
...
Typo in assertion.
2019-09-30 15:26:26 +01:00
Matthew Parkinson
f214abde3f
Typo in assertion.
2019-09-30 13:43:32 +01:00
David Chisnall
fb9e1423e7
Merge pull request #94 from microsoft/revert_type_safety
...
Revert type safety
2019-09-12 17:29:46 -07:00
David Chisnall
6188667476
Revert the change to make the pool global type safe.
...
This adds lazy initialization, which adds a conditional branch on some
hot paths.
Fixes #93
2019-09-12 17:33:59 +01:00
David Chisnall
0b2b4d68a2
Revert "Add type confusion protection to the default memory provider."
...
This reverts commit d56201e28d .
2019-09-12 17:16:48 +01:00
Matthew Parkinson
dbea595b6e
Merge pull request #92 from devnexen/pal_apple_anon_mon
...
darwin: override zero/non zeroed pages to tag them.
2019-08-27 14:43:42 +01:00
David Carlier
281a88d404
Templatize the Tag ID value
2019-08-27 13:10:50 +00:00
David Carlier
eed50baf8e
Little tweaks
2019-08-27 10:42:57 +00:00
David Carlier
c881429e2e
Using the macro instead
2019-08-27 10:20:16 +00:00
David Carlier
24ae5d704e
darwin: override zero/non zeroed pages to tag them.
2019-08-26 18:57:45 +01:00
Matthew Parkinson
7a4b8854f5
Merge pull request #90 from microsoft/minor-fixes
...
Minor fixes
2019-08-15 12:49:44 +01:00
Matthew Parkinson
4827b7615b
Fix inline statics in Pal_Windows.
2019-08-15 11:38:45 +01:00
Matthew Parkinson
ae05ed4dfd
default_memory_provider is a function now.
2019-08-15 11:38:44 +01:00
Matthew Parkinson
6200e1e7eb
Merge pull request #88 from microsoft/CI-testing
...
Fixes to CI testing
2019-08-15 11:35:59 +01:00
Matthew Parkinson
18da679042
Missing setup call.
2019-08-15 10:52:08 +01:00
Matthew Parkinson
e7f9b6e0d9
Add missing UNUSED
2019-08-15 10:52:07 +01:00
Matthew Parkinson
da91c035a9
Shrink size on test on Windows due to taking too long.
2019-08-15 10:52:07 +01:00
Matthew Parkinson
9eaadcd6d8
Reduce parallism in tests
...
If some tests on Windows are co-scheduled, then they run out of commit
space and crash. For example, in func-memory,
test_external_pointer_large can cause the small CI machines to run out
of commit space on Windows.
2019-08-15 10:50:54 +01:00
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