config.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. /* Heap and stack profiling */
  41. #define BEIHAI_ENABLE_MEMORY_PROFILING 0
  42. /* Max app number of all modules */
  43. #define MAX_APP_INSTALLATIONS 3
  44. /* Default timer number in one app */
  45. #define DEFAULT_TIMERS_PER_APP 20
  46. /* Max timer number in one app */
  47. #define MAX_TIMERS_PER_APP 30
  48. /* Max resource registration number in one app */
  49. #define RESOURCE_REGISTRATION_NUM_MAX 16
  50. /* Max length of resource/event url */
  51. #define RESOUCE_EVENT_URL_LEN_MAX 256
  52. /* Default length of queue */
  53. #define DEFAULT_QUEUE_LENGTH 50
  54. /* Default watchdog interval in ms */
  55. #define DEFAULT_WATCHDOG_INTERVAL (3 * 60 * 1000)
  56. /* Workflow heap size */
  57. /*
  58. #define WORKING_FLOW_HEAP_SIZE 0
  59. */
  60. /* Default/min/max heap size of each app */
  61. #define APP_HEAP_SIZE_DEFAULT (48 * 1024)
  62. #define APP_HEAP_SIZE_MIN (2 * 1024)
  63. #define APP_HEAP_SIZE_MAX (1024 * 1024)
  64. /* Default/min/max stack size of each app thread */
  65. #define APP_THREAD_STACK_SIZE_DEFAULT (20 * 1024)
  66. #define APP_THREAD_STACK_SIZE_MIN (16 * 1024)
  67. #define APP_THREAD_STACK_SIZE_MAX (256 * 1024)
  68. #endif