If you're creating a new allocator and the pagemap comes from a library
that exports the pagemap accessor function but not the pagemap symbol,
you need to be able to replace this.
The Linux Debug build is currently one of the slowest two, pull out one
phase of it that is independent and allow it to run in parallel with the
other tests.
- 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).
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.
Replace them with some very simple constexpr things. This is what the
code used to look like, but it appears that I fundamentally
misunderstood why it didn't work. This version should be a lot more
maintainable.
It appears that clang-format 6 (which CI uses) removes a newline that
clang-format 7 doesn't, but will also not add. The new formatting
should keep 6 and 7 both happy.
- Rename MemoryProviderState to PAL to reflect what is now is.
- Hide calls to the PAL's low memory functions behind something that
returns a default value if they're not implemented.
This does not deallocate memory until the OS tells us that we are short
on memory, then tries to decommit all of the cached chunks (except for
the first page, used for the linked lists).
Nowhere near enough testing to commit to master yet!
The newer API (Windows 10 and newer) allows the allocator to ask for
strongly aligned memory.
This is enabled only if the `WINVER` macro is set to target Windows 10
or newer. There is now a CMake option to target older versions of
Windows, so we can test both code paths.
The Azure Pipelines config now includes a test of the compatibility
version. This runs only the release build, because it's mainly there as
a sanity check - 99% of the code is the same as the default Windows
config.
Introduce a `OnePastEnd` option for the pointer immediately after the
end of the allocation. This simplifies some of the logic in callers,
where they wants to say 'is base + length safe to use?'.
Also restructure some of the other logic somewhat.