Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update memory configurations and simplify specification #494

Merged
merged 3 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions build/cmake/ProjectVariables.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,20 @@ IF (NOT DEFINED ENV{PDO_SOURCE_ROOT})
ENDIF()
SET(PDO_SOURCE_ROOT $ENV{PDO_SOURCE_ROOT})

# The memory size option configures enclave and interpreter memory
# size values. The variable may have the value of "SMALL", "MEDIUM" or
# "LARGE". This is a project variable because the configurations
# depend on one another (the interpreter heap size must fit into the
# enclave heap, for example).
SET(PDO_MEMORY_CONFIG "MEDIUM" CACHE STRING "Set memory size parameters for enclave and interpreter")
IF (DEFINED ENV{PDO_MEMORY_CONFIG})
SET(PDO_MEMORY_CONFIG $ENV{PDO_MEMORY_CONFIG})
ENDIF()
SET(MEMORY_SIZE_OPTIONS "SMALL" "MEDIUM" "LARGE")
IF (NOT ${PDO_MEMORY_CONFIG} IN_LIST MEMORY_SIZE_OPTIONS)
MESSAGE(FATAL_ERROR "Invalid memory size; ${PDO_MEMORY_CONFIG}")
ENDIF()

# Get the current version using the get_version
# utility; note that this will provide 0.0.0 as
# the version if something goes wrong (like running
Expand Down
32 changes: 29 additions & 3 deletions build/cmake/SGX.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,41 @@ IF (NOT DEFINED ENV{PDO_SGX_KEY_ROOT})
ENDIF()
SET(PDO_SGX_KEY_ROOT "$ENV{PDO_SGX_KEY_ROOT}")

IF (NOT DEFINED ENV{SGX_MODE})
MESSAGE(FATAL_ERROR "SGX_MODE not defined")
# Memory size should be set in ProjectVariables.cmake which must be included
# before this file. There are three values for memory size: SMALL, MEDIUM
# and LARGE. Each provides defaults for memory allocation. See the note
# about memory size in ProjectVariables.cmake regarding dependencies between
# memory settings here and in other parts of PDO.
IF (NOT DEFINED PDO_MEMORY_CONFIG)
MESSAGE(FATAL_ERROR "PDO_MEMORY_CONFIG not defined")
ENDIF()

IF (${PDO_MEMORY_CONFIG} STREQUAL "SMALL")
MATH(EXPR ENCLAVE_STACK_SIZE "2 * 1024 * 1024")
MATH(EXPR ENCLAVE_HEAP_SIZE "32 * 1024 * 1024")
MATH(EXPR ENCLAVE_RESERVED_SIZE "1 * 1024 * 1024")
ELSEIF (${PDO_MEMORY_CONFIG} STREQUAL "MEDIUM")
MATH(EXPR ENCLAVE_STACK_SIZE "2 * 1024 * 1024")
MATH(EXPR ENCLAVE_HEAP_SIZE "64 * 1024 * 1024")
MATH(EXPR ENCLAVE_RESERVED_SIZE "2 * 1024 * 1024")
ELSEIF (${PDO_MEMORY_CONFIG} STREQUAL "LARGE")
MATH(EXPR ENCLAVE_STACK_SIZE "2 * 1024 * 1024")
MATH(EXPR ENCLAVE_HEAP_SIZE "128 * 1024 * 1024")
MATH(EXPR ENCLAVE_RESERVED_SIZE "4 * 1024 * 1024")
ELSE()
MESSAGE(FATAL_ERROR "Invalid memory size; ${PDO_MEMORY_CONFIG}")
ENDIF()
SET(SGX_MODE $ENV{SGX_MODE})

# There are effectively three build modes for SGX:
# 1) SIM mode with PDO_DEBUG_BUILD enabled
# 2) HW mode with PDO_DEBUG_BUILD enabled
# 3) HW mode with PDO_DEBUG_BUILD disabled (release mode)
# For now we just check the consistency of the variables (SGX_MODE, PDO_DEBUG_BUILD and CMAKE_BUIDL_TYPE)
IF (NOT DEFINED ENV{SGX_MODE})
MESSAGE(FATAL_ERROR "SGX_MODE not defined")
ENDIF()
SET(SGX_MODE $ENV{SGX_MODE})

IF (${SGX_MODE} STREQUAL "SIM")
IF (NOT ${PDO_DEBUG_BUILD})
MESSAGE(FATAL_ERROR "SGX_MODE=SIM does not accept PDO_DEBUG_BUILD=0")
Expand All @@ -47,6 +72,7 @@ ELSE()
SET(SGX_USE_SIMULATOR FALSE)
ENDIF()

# These environment variables are generally set through the SGX SDK
IF (NOT DEFINED ENV{SGX_SDK})
MESSAGE(FATAL_ERROR "SGX_SDK not defined")
ENDIF()
Expand Down
16 changes: 8 additions & 8 deletions build/common-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@ var_set() {
"
env_key_sort[$i]="WASM_SRC"; i=$i+1; export WASM_SRC=${env_val[WASM_SRC]};

env_val[WASM_MEM_CONFIG]="${WASM_MEM_CONFIG:-MEDIUM}"
env_desc[WASM_MEM_CONFIG]="
WASM_MEM_CONFIG indicates the memory configuration for the
WASM runtime: the runtime's global memory pool size,
env_val[PDO_MEMORY_CONFIG]="${PDO_MEMORY_CONFIG:-MEDIUM}"
env_desc[PDO_MEMORY_CONFIG]="
PDO_MEMORY_CONFIG indicates the memory configuration for the
enclave and WASM runtime: the runtime's global memory pool size,
and a module's operand stack and heap size.
When the variable is set to 'SMALL', the runtime's memory pool
size is set to 1MB. If the variable is set to 'MEDIUM', the
runtime's memory pool size is set to 2MB.
size is set to 4MB. If the variable is set to 'MEDIUM', the
runtime's memory pool size is set to 8MB.
When the variable is set to 'LARGE', the runtime's
memory pool size is set to 4MB. See
memory pool size is set to 16MB. See
common/interpreter/wawaka_wasm/README.md for further details.
"
env_key_sort[$i]="WASM_MEM_CONFIG"; i=$i+1; export WASM_MEM_CONFIG=${env_val[WASM_MEM_CONFIG]};
env_key_sort[$i]="PDO_MEMORY_CONFIG"; i=$i+1; export PDO_MEMORY_CONFIG=${env_val[PDO_MEMORY_CONFIG]};

env_val[PDO_INTERPRETER]="${PDO_INTERPRETER:-wawaka}"
env_desc[PDO_INTERPRETER]="
Expand Down
10 changes: 4 additions & 6 deletions build/tests/wawaka/memory-test.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this is where we'd add more tests to push the higher memory size limits?

Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,12 @@
"expected": "1500000"
},
{
"description" : "big value test 2 MB should {invert} with WAMR \"out of memory\" exception",
"description" : "big value test 2 MB",
"MethodName": "big_value_test",
"KeywordParameters": {
"num_chars" : 2000000
},
"invert": "fail",
"expected": "internal pdo error"
"expected": "2000000"
},
{
"description" : "deep recursion test {KeywordParameters}",
Expand Down Expand Up @@ -197,13 +196,12 @@
"expected": "64000"
},
{
"description" : "big key test 1 MB should {invert} with WAMR \"out of memory\" exception",
"description" : "big key test 1 MB",
"MethodName": "big_key_test",
"KeywordParameters": {
"num_chars" : 1000000
},
"invert": "fail",
"expected":"internal pdo error"
"expected":"1000000"
},
{
"description" : "deep recursion test {KeywordParameters}",
Expand Down
46 changes: 25 additions & 21 deletions common/interpreter/wawaka_wasm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ IF (SUBMOD_CONTENTS EQUAL 0)
MESSAGE(FATAL_ERROR "WAMR git submodule has not been cloned. Please run `git submodule update --init` first.")
ENDIF()

IF (NOT DEFINED ENV{WASM_MEM_CONFIG})
MESSAGE(FATAL_ERROR "WASM_MEM_CONFIG environment variable not defined!")
ENDIF()
SET(WASM_MEM_CONFIG "$ENV{WASM_MEM_CONFIG}")

# Reset default linker flags
SET (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
SET (CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
Expand Down Expand Up @@ -164,22 +159,31 @@ SGX_PREPARE_TRUSTED(${WAWAKA_STATIC_NAME})
# HEAP_SIZE: Size of the runtime's heap for dynamic allocations by a WASM module.
# STACK_SIZE: Size of the runtime's stack for executing a WASM module
# Layout: RUNTIME_MEM_POOL_SIZE > HEAP_SIZE + STACK_SIZE + padding
IF (WASM_MEM_CONFIG STREQUAL "SMALL")
MESSAGE(STATUS "Using SMALL memory configuration")
TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE RUNTIME_MEM_POOL_SIZE=1*1024*1024)
TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE HEAP_SIZE=512*1024)
TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE STACK_SIZE=64*1024)
ELSEIF (WASM_MEM_CONFIG STREQUAL "LARGE")
MESSAGE(STATUS "Using LARGE memory configuration")
TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE RUNTIME_MEM_POOL_SIZE=4*1024*1024)
TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE HEAP_SIZE=3*1024*1024)
TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE STACK_SIZE=256*1024)
ELSE ()
MESSAGE(STATUS "Using MEDIUM memory configuration")
TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE RUNTIME_MEM_POOL_SIZE=2*1024*1024)
TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE HEAP_SIZE=1536*1024)
TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE STACK_SIZE=128*1024)
ENDIF ()
# The numbers below were chosen to set RUNTIME_MEM_POOL_SIZE to be about
# 1/8 of the size of the enclave heap size defined in the SGX.cmake file.
IF (NOT DEFINED PDO_MEMORY_CONFIG)
MESSAGE(FATAL_ERROR "PDO_MEMORY_CONFIG not defined")
ENDIF()

IF (${PDO_MEMORY_CONFIG} STREQUAL "SMALL")
MATH(EXPR WW_RUNTIME_MEM_POOL_SIZE "4 * 1024 * 1024")
MATH(EXPR WW_STACK_SIZE "512 * 1024")
MATH(EXPR WW_HEAP_SIZE "3 * 1024 * 1024")
ELSEIF (${PDO_MEMORY_CONFIG} STREQUAL "MEDIUM")
MATH(EXPR WW_RUNTIME_MEM_POOL_SIZE "8 * 1024 * 1024")
MATH(EXPR WW_STACK_SIZE "512 * 1024")
MATH(EXPR WW_HEAP_SIZE "7 * 1024 * 1024")
ELSEIF (${PDO_MEMORY_CONFIG} STREQUAL "LARGE")
MATH(EXPR WW_RUNTIME_MEM_POOL_SIZE "16 * 1024 * 1024")
MATH(EXPR WW_STACK_SIZE "512 * 1024")
MATH(EXPR WW_HEAP_SIZE "15 * 1024 * 1024")
ELSE()
MESSAGE(FATAL_ERROR "Invalid memory size; ${PDO_MEMORY_CONFIG}")
ENDIF()

TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE RUNTIME_MEM_POOL_SIZE=${WW_RUNTIME_MEM_POOL_SIZE})
TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE HEAP_SIZE=${WW_HEAP_SIZE})
TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE STACK_SIZE=${WW_STACK_SIZE})

TARGET_INCLUDE_DIRECTORIES(${WAWAKA_STATIC_NAME} PRIVATE ${INTERPRETER_INCLUDE_DIRS})
TARGET_INCLUDE_DIRECTORIES(${WAWAKA_STATIC_NAME} PRIVATE ${IWASM_DIR}/include)
Expand Down
10 changes: 5 additions & 5 deletions common/interpreter/wawaka_wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,17 @@ be adjusted depending on the requirements for a WASM contract:
To facilitate configuring wawaka's memory, we provide
three pre-defined memory configurations that meet most
contract requirements:
- `SMALL`: 1MB WASM runtime memory pool (64KB stack, 768KB heap)
- `MEDIUM`: 2MB WASM runtime memory pool (256KB stack, 1.5MB heap)
- `LARGE`: 4MB WASM runtime memory pool (512KB stack, 3MB heap)
- `SMALL`: 4MB WASM runtime memory pool (512KB stack, 3MB heap)
- `MEDIUM`: 8MB WASM runtime memory pool (512KB stack, 7MB heap)
- `LARGE`: 16MB WASM runtime memory pool (512KB stack, 15MB heap)

To use a specific memory configuration, set
the environment variable `WASM_MEM_CONFIG` (the default is the `MEDIUM`
the environment variable `PDO_MEMORY_CONFIG` (the default is the `MEDIUM`
configuration) to build the wawaka interpreter with those memory
settings:

```bash
export WASM_MEM_CONFIG=MEDIUM
export PDO_MEMORY_CONFIG=MEDIUM
```

Here are some tips for choosing the right wawaka memory configuration
Expand Down
33 changes: 0 additions & 33 deletions contracts/wawaka/contract-build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,40 +28,11 @@ IF (NOT DEFINED ENV{WASM_SRC})
ENDIF()
SET(WASM_SRC "$ENV{WASM_SRC}")

IF (NOT DEFINED ENV{WASM_MEM_CONFIG})
MESSAGE(FATAL_ERROR "WASM_MEM_CONFIG environment variable not defined!")
ENDIF()
SET(WASM_MEM_CONFIG "$ENV{WASM_MEM_CONFIG}")

# this should be set by the WAMR toolchain file
IF (NOT DEFINED WASI_SDK_DIR)
MESSAGE(FATAL_ERROR "WASM_SDK_DIR was not defined, check toolchain defines")
ENDIF()

# ---------------------------------------------
# Set up the memory configuration
# ---------------------------------------------

# LINEAR_MEMORY: Maximum size for a WASM module's linear memory (module's
# internal stack + static globals + padding); needs to be multiple of 64KB

# INTERNAL_STACK_SIZE: Size of a WASM module's internal data stack
# (part of LINEAR_MEMORY)

IF (WASM_MEM_CONFIG STREQUAL "SMALL")
SET(INTERNAL_STACK_SIZE 24576)
SET(LINEAR_MEMORY 65536)
message(STATUS "Building contracts for SMALL memory configuration")
ELSEIF (WASM_MEM_CONFIG STREQUAL "LARGE")
SET(INTERNAL_STACK_SIZE 98304)
SET(LINEAR_MEMORY 262144)
message(STATUS "Building contracts for LARGE memory configuration")
ELSE()
SET(INTERNAL_STACK_SIZE 49152)
SET(LINEAR_MEMORY 131072)
message(STATUS "Building contracts for MEDIUM memory configuration")
ENDIF ()

# ---------------------------------------------
# Set up the compiler configuration
# ---------------------------------------------
Expand All @@ -80,11 +51,7 @@ LIST(APPEND WASM_BUILD_OPTIONS "-std=c++11")
LIST(APPEND WASM_BUILD_OPTIONS "-DUSE_WASI_SDK=1")

SET(WASM_LINK_OPTIONS)
LIST(APPEND WASM_LINK_OPTIONS "-Wl,--initial-memory=${LINEAR_MEMORY}")
LIST(APPEND WASM_LINK_OPTIONS "-Wl,--max-memory=${LINEAR_MEMORY}")
LIST(APPEND WASM_LINK_OPTIONS "-z stack-size=${INTERNAL_STACK_SIZE}")
Comment on lines -83 to -85
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot find much documentation about this (i.e., how memory is handled initially and at runtime).
Can it be that the default settings make WAMR allocate static chunks of memory as the interpreter is instantiated?
If that's the case, this would raise the startup cost for any contract execution -- this similarly holds for the enclave as well, but that's a one-time cost.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this was a requirement for earlier versions of clang. this was necessary for the combination of the compiler and the interpreter. the wamr documentation no longer talks about this as a requirement.
AND
making this explicit tend to make the contracts themselves very unstable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding the allocation... this effectively has nothing to do with the allocation in the interpreter. The fields in the common/interpreter/wawaka cmake file are the only ones that matter for actual allocation.

LIST(APPEND WASM_LINK_OPTIONS "-Wl,--allow-undefined")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are build/link-time memory options, hence under the control of developers/users. I am wondering if any of these should be checked (somehow) by the eservice before running the related contract for safety or efficiency reasons.
The interpreter's memory configuration should define the boundaries of a contract's memory configuration, so safety should not be an issue. However, contracts could still always max out memory. Does that determine an efficiency issue for the eservice or an unfair allocation w.r.t. other contracts?

Copy link
Contributor Author

@cmickeyb cmickeyb Jun 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the numbers are too big then the interpreter will throw the error. and... in fact... i have a hard time making anything other than the default work with the current version of WAMR.

and to be clear... these are contract allocations. any developer can set them to whatever is required.


LIST(APPEND WASM_LINK_OPTIONS "-Wl,--export=ww_dispatch")
LIST(APPEND WASM_LINK_OPTIONS "-Wl,--export=ww_initialize")

Expand Down
18 changes: 0 additions & 18 deletions contracts/wawaka/memory-test/test-small.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these test cases being removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mostly because they no longer fail and are redundant with other tests already in place.

Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,6 @@
},
"expected": "512000"
},
{
"description" : "big value test 521 KB should {invert} with WAMR \"out of memory\" exception",
"MethodName": "big_value_test",
"KeywordParameters": {
"num_chars" : 521000
},
"invert": "fail",
"expected": "internal pdo error"
},
{
"description" : "deep recursion test {KeywordParameters}",
"MethodName": "deep_recursion_test",
Expand All @@ -64,15 +55,6 @@
},
"expected": "256000"
},
{
"description" : "big key test 300 KB should {invert} with WAMR \"out of memory\" exception",
"MethodName": "big_key_test",
"KeywordParameters": {
"num_chars" : 300000
},
"invert": "fail",
"expected": "internal pdo error"
},
{
"description" : "deep recursion test {KeywordParameters}",
"MethodName": "deep_recursion_test",
Expand Down
3 changes: 0 additions & 3 deletions docker/pdo_client.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ ENV PDO_LEDGER_TYPE=${PDO_LEDGER_TYPE}
ARG PDO_INTERPRETER=wawaka
ENV PDO_INTERPRETER=${PDO_INTERPRETER}

ARG WASM_MEM_CONFIG=MEDIUM
ENV WASM_MEM_CONFIG=${WASM_MEM_CONFIG}

ARG PDO_LOG_LEVEL=info
ENV PDO_LOG_LEVEL=${PDO_LOG_LEVEL}

Expand Down
4 changes: 2 additions & 2 deletions docker/pdo_services.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ ENV PDO_LEDGER_TYPE=${PDO_LEDGER_TYPE}
ARG PDO_INTERPRETER=wawaka
ENV PDO_INTERPRETER=${PDO_INTERPRETER}

ARG WASM_MEM_CONFIG=MEDIUM
ENV WASM_MEM_CONFIG=${WASM_MEM_CONFIG}
ARG PDO_MEMORY_CONFIG=MEDIUM
ENV PDO_MEMORY_CONFIG=${PDO_MEMORY_CONFIG}

ARG PDO_LOG_LEVEL=info
ENV PDO_LOG_LEVEL=${PDO_LOG_LEVEL}
Expand Down
2 changes: 1 addition & 1 deletion docker/tools/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
export SGX_MODE=${SGX_MODE:-SIM}
export PDO_LEDGER_TYPE=${PDO_LEDGER_TYPE:-ccf}
export PDO_INTERPRETER=${PDO_INTERPRETER:-wawaka}
export WASM_MEM_CONFIG=${WASM_MEM_CONFIG:-MEDIUM}
export PDO_MEMORY_CONFIG=${PDO_MEMORY_CONFIG:-MEDIUM}
export PDO_DEBUG_BUILD=${PDO_DEBUG_BUILD:-1}

# these variables are internal to the layout of the container and immutable
Expand Down
19 changes: 8 additions & 11 deletions docs/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,16 @@ The git submodule points to the latest tagged commit of [WAMR](https://github.co
`WAMR-1.1.2`.

<!-- -------------------------------------------------- -->
### `WASM_MEM_CONFIG`
### `PDO_MEMORY_CONFIG`
(default: `MEDIUM`)

`WASM_MEM_CONFIG` indicates the memory configuration for the
WASM runtime: the runtime's global memory pool size,
the WASM module's heap size, and the size of module's
operand stack.
When the variable is set to `SMALL`, the runtime's global memory
pool size is set to 1MB.
If the variable is set to `MEDIUM`, the runtime's memory pool
size is set to 2MB.
When the variable is set to `LARGE`, the runtime's memory
pool size is set to 4MB.
`PDO_MEMORY_CONFIG` indicates the memory configuration for the enclave
and WASM runtime: the runtime's global memory pool size, the WASM
module's heap size, and the size of module's operand stack. When the
variable is set to `SMALL`, the runtime's global memory pool size is
set to 4MB. If the variable is set to `MEDIUM`, the runtime's memory
pool size is set to 8MB. When the variable is set to `LARGE`, the
runtime's memory pool size is set to 16MB.

<!-- -------------------------------------------------- -->
<!-- -------------------------------------------------- -->
Expand Down
7 changes: 4 additions & 3 deletions eservice/lib/libpdo_enclave/pdo_enclave.config.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ limitations under the License.
<EnclaveConfiguration>
<ProdID>0x90E7</ProdID>
<ISVSVN>1</ISVSVN>
<StackMaxSize>0x80000</StackMaxSize>
<HeapMaxSize>0x2000000</HeapMaxSize>
<ReservedMemMaxSize>0x100000</ReservedMemMaxSize>
<StackMaxSize>${ENCLAVE_STACK_SIZE}</StackMaxSize>
<HeapMaxSize>${ENCLAVE_HEAP_SIZE}</HeapMaxSize>
<ReservedMemMaxSize>${ENCLAVE_RESERVED_SIZE}</ReservedMemMaxSize>
<ReservedMemInitSize>${ENCLAVE_RESERVED_SIZE}</ReservedMemInitSize>
<ReservedMemExecutable>1</ReservedMemExecutable>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we switch this to 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think thats a deeper discussion and requires additional research on its impact for different WAMR settings. this has been our setting all along. i would suggest that we add an issue to investigate the implications.

<TCSNum>2</TCSNum>
<TCSPolicy>1</TCSPolicy>
Expand Down
Loading