Matthew Parkinson
f88bcdbf58
Made alloc_chunk typed
...
Alloc_chunk now allocates and calls the constructor.
2019-04-29 11:02:47 +01:00
Matthew Parkinson
a8618b0892
Use uintptr_t in signature for pagemap
...
We don't follow the pointers passed into the pagemap directly, but
instead use them to calculate indexs into the pagemap. Use uintptr_t
means it is easier to perform address arithmetic, and not have casts
back to void* everywhere.
2019-04-29 11:02:47 +01:00
Matthew Parkinson
4faf9f3bee
Use fewer header files
...
Removing some includes to reduce the code that is dragged in.
2019-04-29 11:02:47 +01:00
David Chisnall
7f057f308f
Fix inverted logic in the type check.
2019-04-11 17:31:44 +01:00
David Chisnall
9b3641df91
Address Matt's review comments.
2019-04-11 17:08:16 +01:00
David Chisnall
29aa8ef67e
Give up on new making CI support recent clang-format.
...
Revert to 6.0 and use that locally to insert an extra blank line to make
CI happy...
2019-04-10 13:25:43 +01:00
David Chisnall
c673926d15
Add missing const.
...
No idea why this only raised an error with cl.exe, it was wrong on all
platforms.
2019-04-10 13:13:09 +01:00
David Chisnall
ad0a22e571
Add missing doc comments.
2019-04-10 12:49:02 +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
Matthew Parkinson
c1e23c497f
Made alignment a template parameter.
2019-01-18 17:00:10 +00:00
Matthew Parkinson
a62e77f930
Align pagemap entries to OS_PAGE_SIZE
...
Guarantee the page map is page aligned. Fix public API.
2019-01-18 15:22:08 +00:00
Matthew Parkinson
ee9d899aa3
Remove GRANULARITY check
...
This check was not doing anything. It was from an earlier dependency
ordering issue that has now been fixed.
2019-01-17 14:38:14 +00:00
Matthew Parkinson
ab57c86e3a
Addressing CR feedback
2019-01-16 17:03:15 +00:00
Matthew Parkinson
233be30731
Implement a FlatPagemap
...
The current pagemap assumes there is at least one level of indexing.
This commit introduces a new pagemap that is completely flat. This is
useful for 32bit, where there is no need to introduce the indexing
structure.
This pagemap is also considerably faster for 64bit platforms, but
does require a global allocation of 16MiB of the flat page map.
2019-01-16 14:38:11 +00:00
Matthew Parkinson
74018a1c91
Correct PageMap public API
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