Change default chunksize to 1MiB (#229)

This change makes the original 16MiB option not the common option.

It also changes the names of the defines to
  SNMALLOC_USE_LARGE_CHUNKS
  SNMALLOC_USE_SMALL_CHUNKS

The second should be set for Open Enclave configuration, and results in
256KiB chunk sizes.  The first being set builds the original 16MiB chunk
sizes.  If neither is set, then we default to 1MiB chunk sizes.
This commit is contained in:
Matthew Parkinson
2020-07-09 13:22:32 +01:00
committed by GitHub
parent 8d1f3c3046
commit 4e1f5829a7
6 changed files with 29 additions and 35 deletions

View File

@@ -1,7 +1,6 @@
#define SNMALLOC_SGX
#define OPEN_ENCLAVE
#define OPEN_ENCLAVE_SIMULATION
#define USE_RESERVE_MULTIPLE 1
#include <iostream>
#include <snmalloc.h>

View File

@@ -1,9 +1,7 @@
#undef IS_ADDRESS_SPACE_CONSTRAINED
#undef SNMALLOC_USE_LARGE_CHUNKS
#define OPEN_ENCLAVE
#define OPEN_ENCLAVE_SIMULATION
#define USE_RESERVE_MULTIPLE 1
#define NO_BOOTSTRAP_ALLOCATOR
#define IS_ADDRESS_SPACE_CONSTRAINED
#define SNMALLOC_EXPOSE_PAGEMAP
#define SNMALLOC_NAME_MANGLE(a) enclave_##a
// Redefine the namespace, so we can have two versions.

View File

@@ -1,6 +1,6 @@
// Remove parameters feed from test harness
#undef ADDRESS_SPACE_CONSTRAINED
#undef REALLY_ADDRESS_SPACE_CONSTRAINED
#undef SNMALLOC_USE_LARGE_CHUNKS
#undef SNMALLOC_USE_SMALL_CHUNKS
#define SNMALLOC_NAME_MANGLE(a) host_##a
#define NO_BOOTSTRAP_ALLOCATOR