Commit Graph

505 Commits

Author SHA1 Message Date
David Carlier
55f1237df9 Few build tweaks. 2020-03-17 12:16:21 +00:00
David Carlier
c6baa0baa3 using C++11 api instead for fallback call. 2020-03-17 10:08:17 +00:00
David Carlier
e611b325ce Last tweaks 2020-03-16 18:59:51 +00:00
David Carlier
6b8650e4ce Using fallback when the (none)feature bit is present. 2020-03-13 16:46:16 +00:00
David Carlier
e7f020cf76 implementations moved on the composer class. 2020-03-13 15:39:49 +00:00
David Carlier
2d4f2c3867 AAL, basic arm implementation proposal. 2020-03-13 08:09:14 +00:00
Amaury Chamayou
8e3efcb1dc Assert not going through the PAL (#140)
* Assert not going through the PAL

* Make it more difficult to assert() accidentally
2020-03-11 15:58:44 +00:00
Amaury Chamayou
3911e2c4b5 Update the macOS image, since 10.13 is going out of support 2020-03-11 14:46:41 +00:00
Alex
beb99ddc38 Extra helper functions for dllist (#139)
* More helpful functions for dllist
2020-03-11 10:07:29 +00:00
Matthew Parkinson
76eaf1adad Remote dealloc refactor. (#138)
Improve remote dealloc

- Outline the slow path to improve code gen significantly

- Handle message queue only on slow path for remote dealloc.

- Change remote size to count down 0, so fast path does not need a constant.

- Use signed value so that branch does not depend on addition.
2020-03-10 08:12:57 +00:00
Matthew Parkinson
31da639f49 Merge pull request #137 from SchrodingerZhu/master
fix MinGW
2020-03-09 11:57:18 +00:00
SchrodingerZhu
8077c66a8e format bits 2020-03-08 22:50:34 +08:00
SchrodingerZhu
65de3c41bc fix mingw 2020-03-08 22:13:49 +08:00
Matthew Parkinson
51e919385f Merge pull request #135 from achamayou/no_assert
replace assert with SNMALLOC_ASSERT
2020-03-04 19:35:41 +00:00
Matthew Parkinson
b79448b6b5 Update src/ds/defines.h
Clang format
2020-03-04 17:59:13 +00:00
Matthew Parkinson
9dc689762c Apply suggestions from code review 2020-03-04 17:44:54 +00:00
Amaury Chamayou
acbcbce597 replace assert with SNMALLOC_ASSERT 2020-03-04 16:57:44 +00:00
Matthew Parkinson
ef77bccfc2 Merge pull request #134 from microsoft/gcc8_warning
Address GCC8 warning
2020-03-03 11:29:42 +00:00
Matthew Parkinson
814f3ba289 Merge pull request #128 from microsoft/low-memory-async
Make Lazy Decomit asynchronous
2020-03-03 11:29:23 +00:00
Matthew Parkinson
b756ca08a7 Address GCC8 warning
The bootstrapping allocator needs to perform a memcpy to bypass the
removed move constructors on std::atomic.  This is safe as there is no
concurrency at this point, but GCC is unhappy with this.

This commit moves CI to GCC8 and disables this warning for that line.
2020-03-01 20:48:03 +00:00
Matthew Parkinson
d74976de26 Merge pull request #132 from microsoft/prerelease
Update documentation
2020-02-28 14:34:09 +00:00
Matthew Parkinson
040c878c6e Update documentation
The readme was considerably out of date, with the introduction
being over a year old.  This commit reflects the developments and
improvements in stabiity of snmalloc.
2020-02-28 09:03:41 +00:00
Matthew Parkinson
813367286e Make Lazy Decomit asynchronous
On platforms that support low-memory notifications register callbacks
that perform lazy decommit. This allows idle processes to return memory
to the OS. Without incurring the cost of constantly committing and
decommitting memory.

Code review and CI changes

* Fixed test to use a template to make constexpr magic work
* Factored out basic notification mechanism so can be reused on other
platforms.
2020-02-27 20:05:44 +00:00
Matthew Parkinson
8f7b914b52 Merge pull request #131 from achamayou/openenclave_pal_fixes
Fix recent OpenEnclave + snmalloc Release build
2020-02-27 18:01:41 +00:00
Amaury Chamayou
ed6f836529 Merge branch 'openenclave_pal_fixes' of github.com:achamayou/snmalloc into openenclave_pal_fixes 2020-02-27 17:26:05 +00:00
Amaury Chamayou
9f31f8075c Use UNUSED 2020-02-27 17:24:07 +00:00
Matthew Parkinson
87153545ed Update src/test/func/two_alloc_types/main.cc 2020-02-27 16:40:21 +00:00
Amaury Chamayou
fdc582b619 Fix formatting 2020-02-27 16:21:24 +00:00
Amaury Chamayou
bd5702fa05 Fix recent OpenEnclave + snmalloc Release build 2020-02-27 14:12:28 +00:00
Matthew Parkinson
8723ae2443 Merge pull request #129 from microsoft/cxa_remove
Removing some calls into the C++ runtime
2020-02-27 11:38:11 +00:00
Matthew Parkinson
be47aea0c8 Tidying 2020-02-26 21:24:02 +00:00
Matthew Parkinson
c1c8a7bfee Clang format. 2020-02-26 20:59:38 +00:00
Matthew Parkinson
136dd23932 Fixed test. 2020-02-26 20:39:31 +00:00
Matthew Parkinson
9f53ec0ef8 Reduce dependence on C++ runtime
If the external thread statics are used, then
we don't need to include some C++ runtime
concepts. This refactoring moves some global initialization under
conditional compilation.
2020-02-26 17:55:29 +00:00
Matthew Parkinson
3775a625a4 Fix systematic testing for Verona. 2020-02-10 12:12:51 +00:00
Matthew Parkinson
4367a0cbdc Merge pull request #126 from microsoft/clangformat9
Update to use clangformat9
2020-02-06 13:15:16 +00:00
Matthew Parkinson
c9da18a145 Improve Debug test speed.
Removed some very expensive debug checks off the fast path
of deallocation.
2020-02-06 13:05:40 +00:00
Matthew Parkinson
ba5bcf031c Fix Clang-tidy call 2020-02-06 13:04:06 +00:00
Matthew Parkinson
cae3317964 Update to use clangformat9
With clangformat9 the AfterCaseLabel is introduced.
And this defaults to false, but our code is formatted
implicitly with this set to true.

PRs to Verona and Snmalloc are being formatted with clangformat9,
and this is causing complexity. Let's move forward to clangformat9
in CI.
2020-02-06 09:09:32 +00:00
Matthew Parkinson
1d72024a9f Merge pull request #124 from microsoft/alignment
Make Large allocations naturally aligned
2020-02-05 14:40:13 +00:00
Matthew Parkinson
de64a8c0c2 CF and Add checks to CI. 2020-02-05 13:41:49 +00:00
Matthew Parkinson
28658a47f0 Code review feedback. 2020-02-05 12:47:24 +00:00
Matthew Parkinson
f2c22ceed6 Merge pull request #123 from microsoft/low-memory-fix
Issue with low-memory notification
2020-02-04 15:09:32 +00:00
Matthew Parkinson
02427f98f0 Clangformat. 2020-02-04 14:12:28 +00:00
Matthew Parkinson
9d6bf750f7 Clang format. 2020-02-04 13:22:56 +00:00
Matthew Parkinson
5d85c203c3 Fixes to test for CI. 2020-02-04 13:22:56 +00:00
Matthew Parkinson
a0e6c66af0 Remove test from 32bit Windows
Windows is only sending low-memory notifications when the machine
is reaching low-memory. So running a 32bit process on 64bit machine
can easily exhaust address space before machine gets close to
low-memory.
2020-02-04 13:22:55 +00:00
Matthew Parkinson
9e1c12636c Issue with low-memory notification
The low-memory notification was getting into an infinite loop.  This
fixes the loop termination, and provides a test for platforms which
support low-memory notification.
2020-02-04 13:22:55 +00:00
Matthew Parkinson
bad94e80d3 Clangformat 2020-02-04 10:24:57 +00:00
Matthew Parkinson
4b175fceeb Make Posix platforms check Commit in Debug
By turning page access on and off, we can simulate the Windows
Commit/Decommit states on Posix platforms.

This is just enabled in Debug for now.
2020-02-04 10:19:23 +00:00