Move constants into the right file.

Document them while we're moving them.
This commit is contained in:
David Chisnall
2019-04-11 16:57:12 +01:00
parent cd8ba18191
commit 785766b129
2 changed files with 15 additions and 6 deletions

View File

@@ -4,12 +4,6 @@
namespace snmalloc
{
enum ZeroMem
{
NoZero,
YesZero
};
// 0 intermediate bits results in power of 2 small allocs. 1 intermediate
// bit gives additional sizeclasses at the midpoint between each power of 2.
// 2 intermediate bits gives 3 intermediate sizeclasses, etc.

View File

@@ -27,4 +27,19 @@ namespace snmalloc
*/
AlignedAllocation = (1 << 1)
};
/**
* Flag indicating whether requested memory should be zeroed.
*/
enum ZeroMem
{
/**
* Memory should not be zeroed, contents are undefined.
*/
NoZero,
/**
* Memory must be zeroed. This can be lazily allocated via a copy-on-write
* mechanism as long as any load from the memory returns zero.
*/
YesZero
};
}