Matthew Parkinson
a32882cd55
Make malloc functional test check for leaks.
2019-08-13 13:03:06 +01:00
Matthew Parkinson
df1896d55f
Improved ThreadAlloc::get API
...
Made the API so that get always returns an initialised Alloc*. Added
new fast path that doesn't perform checking, but can lead to very slow
behaviour if called and reused.
2019-07-15 15:02:47 +01:00
David Chisnall
14b5c57b55
Fix all of the tests.
2019-07-05 13:24:28 +01:00
Matthew Parkinson
7a8eaec2cc
Made a sizecass_t to wrap the sizeclass
...
This is useful as codegen is nicer if we use size_t, but the semantics
is uint8_t, and is stored as that in many places in the metadata.
Ultimately should introduce a wrapper to check this invariant.
2019-07-01 14:30:05 +01:00
Matthew Parkinson
5030fff9bd
Missing include from test.
2019-04-29 11:02:47 +01:00
David Chisnall
ca804c1815
[NFC] clang-format
2019-04-11 17:36:14 +01:00
David Chisnall
5c1abffdda
Fix missing const.
2019-04-11 17:25:53 +01:00
David Chisnall
9b3641df91
Address Matt's review comments.
2019-04-11 17:08:16 +01:00
David Chisnall
9d24f7e24f
Fix callers of renamed function.
2019-04-11 10:42:50 +01:00
David Chisnall
a93f43fd2f
Add some type safety to other pagemap accesses.
...
Introduce a descriptor for the pagemap config and check that the source
descriptor is compatible with the destination type.
2019-04-09 15:52:38 +01:00
David Chisnall
ef50a0282b
Attempt to make CI faster.
...
- Don't run an expensive functionality test in debug builds.
- Don't run the different cache configurations (they're probably going
away soon because they help only in synthetic benchmarks).
2019-02-25 16:33:57 +00:00
David Chisnall
6a5359b177
Pull aligned allocation out of the PAL.
...
The PAL can now advertise that it supports aligned allocation. If it
does not, then the memory provider will do the alignment for it.
This change still leaves the PAL responsible for systematic testing, but
it should now be much easier to lift that out.
2019-02-25 12:54:16 +00:00
Matthew Parkinson
ccccd686fb
Merge pull request #16 from Microsoft/Sizeclass
...
Simplified sizeclass calculations and added tests.
2019-02-19 13:07:08 +00:00
Matthew Parkinson
e7d90966f6
Made the malloc tests run on Windows
2019-02-15 14:36:47 +00:00
Theo Butler
a3fb2b9531
cleanup some tests
2019-02-14 22:31:45 -05:00
Theo Butler
d2909eed0a
Merge branch 'master' into malloc-tests
2019-02-14 22:30:48 -05:00
Matthew Parkinson
8b9a525500
Added zero test at threshold.
2019-02-14 19:59:36 +00:00
Theo Butler
057595a57e
remove -1 check in calloc
2019-02-13 16:03:38 -05:00
Theo Butler
942313fec7
replace asserts with abort
2019-02-13 10:03:41 -05:00
Theo Butler
24ba068dce
remove randomness from malloc tests
2019-02-13 08:42:51 -05:00
theodus
a9615bc6aa
mark variables unused in release build
2019-02-12 20:22:10 -05:00
Theo Butler
f6497e6ee3
Add malloc tests
2019-02-12 19:50:15 -05:00
Matthew Parkinson
9981bad9b5
clang format
2019-02-11 14:47:12 +00:00
Matthew Parkinson
fdcad7feb4
Add test for sizeclass calculations
2019-02-11 14:47:12 +00:00
Matthew Parkinson
28a28bb1ed
Simple example of using two allocators in one application.
...
Example to simulate using two allocators in one application. This will
be useful for scenarios in openenclave.
2019-01-23 13:19:46 +00:00
Matthew Parkinson
dc19b5ace2
Test to check external pointer on deallocated objects
...
This fails an assertion as it reads from a "head" and assumes it is a
sizeclass. This leads to accessing memory out of bounds.
2019-01-18 21:11:01 +00:00
Matthew Parkinson
272bebb927
Reduce size of test on 32bit
2019-01-16 14:38:10 +00:00
Matthew Parkinson
4f9d991449
Initial commit of snmalloc
...
History squashed from internal development.
Internal history has commit hash:
e27a0e485c44a5003a802de2661ce3b21e120316
2019-01-15 14:17:55 +00:00