wasm_memory.h 847 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (C) 2019 Intel Corporation. All rights reserved.
  3. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. */
  5. #ifndef _WASM_MEMORY_H
  6. #define _WASM_MEMORY_H
  7. #include "bh_common.h"
  8. #include "../include/wasm_export.h"
  9. #include "../interpreter/wasm_runtime.h"
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. bool
  14. wasm_runtime_memory_init(mem_alloc_type_t mem_alloc_type,
  15. const MemAllocOption *alloc_option);
  16. void
  17. wasm_runtime_memory_destroy();
  18. unsigned
  19. wasm_runtime_memory_pool_size();
  20. void
  21. wasm_runtime_set_mem_bound_check_bytes(WASMMemoryInstance *memory,
  22. uint64 memory_data_size);
  23. void
  24. wasm_runtime_set_enlarge_mem_error_callback(
  25. const enlarge_memory_error_callback_t callback, void *user_data);
  26. #ifdef __cplusplus
  27. }
  28. #endif
  29. #endif /* end of _WASM_MEMORY_H */