config.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. * Copyright (C) 2019 Intel Corporation. All rights reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef _CONFIG_H_
  17. /* Memory allocator ems */
  18. #define MEM_ALLOCATOR_EMS 0
  19. /* Memory allocator tlsf */
  20. #define MEM_ALLOCATOR_TLSF 1
  21. /* Default memory allocator */
  22. #define DEFAULT_MEM_ALLOCATOR MEM_ALLOCATOR_EMS
  23. /* Beihai log system */
  24. #define BEIHAI_ENABLE_LOG 1
  25. /* Beihai debugger support */
  26. #define BEIHAI_ENABLE_TOOL_AGENT 1
  27. /* Beihai debug monitoring server, must define
  28. BEIHAI_ENABLE_TOOL_AGENT firstly */
  29. #define BEIHAI_ENABLE_TOOL_AGENT_BDMS 1
  30. /* enable no signature on sdv since verify doesn't work as lacking public key */
  31. #ifdef CONFIG_SDV
  32. #define BEIHAI_ENABLE_NO_SIGNATURE 1
  33. #else
  34. #define BEIHAI_ENABLE_NO_SIGNATURE 0
  35. #endif
  36. /* WASM VM log system */
  37. #define WASM_ENABLE_LOG 1
  38. /* WASM Interpreter labels-as-values feature */
  39. #define WASM_ENABLE_LABELS_AS_VALUES 1
  40. /* WASM Branch Block address hashmap */
  41. #define WASM_ENABLE_HASH_BLOCK_ADDR 0
  42. /* Heap and stack profiling */
  43. #define BEIHAI_ENABLE_MEMORY_PROFILING 0
  44. /* Max app number of all modules */
  45. #define MAX_APP_INSTALLATIONS 3
  46. /* Default timer number in one app */
  47. #define DEFAULT_TIMERS_PER_APP 20
  48. /* Max timer number in one app */
  49. #define MAX_TIMERS_PER_APP 30
  50. /* Max resource registration number in one app */
  51. #define RESOURCE_REGISTRATION_NUM_MAX 16
  52. /* Max length of resource/event url */
  53. #define RESOUCE_EVENT_URL_LEN_MAX 256
  54. /* Default length of queue */
  55. #define DEFAULT_QUEUE_LENGTH 50
  56. /* Default watchdog interval in ms */
  57. #define DEFAULT_WATCHDOG_INTERVAL (3 * 60 * 1000)
  58. /* Workflow heap size */
  59. /*
  60. #define WORKING_FLOW_HEAP_SIZE 0
  61. */
  62. /* Default min/max heap size of each app */
  63. #define APP_HEAP_SIZE_DEFAULT (8 * 1024)
  64. #define APP_HEAP_SIZE_MIN (2 * 1024)
  65. #define APP_HEAP_SIZE_MAX (1024 * 1024)
  66. /* Default wasm stack size of each app */
  67. #define DEFAULT_WASM_STACK_SIZE (8 * 1024)
  68. /* Default/min/max stack size of each app thread */
  69. #ifndef __ZEPHYR__
  70. #define APP_THREAD_STACK_SIZE_DEFAULT (20 * 1024)
  71. #define APP_THREAD_STACK_SIZE_MIN (16 * 1024)
  72. #define APP_THREAD_STACK_SIZE_MAX (256 * 1024)
  73. #else
  74. #define APP_THREAD_STACK_SIZE_DEFAULT (4 * 1024)
  75. #define APP_THREAD_STACK_SIZE_MIN (2 * 1024)
  76. #define APP_THREAD_STACK_SIZE_MAX (256 * 1024)
  77. #endif
  78. #endif