1  /*
2   * Copyright (C) 2015-2017 Alibaba Group Holding Limited
3   */
4  
5  #ifndef RAMFS_ADAPT_H
6  #define RAMFS_ADAPT_H
7  
8  #ifdef __cplusplus
9  extern "C" {
10  #endif
11  
12  /**
13   * @brief wrapper of MM allocation
14   *
15   * @param[in] size size of the mem to alloc
16   *
17   * @return NUll is error, other is memory address
18   */
19  void *ramfs_mm_alloc(uint32_t size);
20  
21  /**
22   * @brief wrapper of MM free
23   *
24   * @param[in] ptr address point of the mem
25   */
26  void ramfs_mm_free(void *ptr);
27  
28  /**
29   * @brief wrapper of MM realloc
30   *
31   * @param[in] oldmem  pointer to the original memory
32   * @param[in] newsize the new size to realloc
33   *
34   * @return NULL is error, other is new memory address
35   */
36  void *ramfs_mm_realloc(void *oldmem, uint32_t newsize);
37  
38  #ifdef __cplusplus
39  }
40  #endif
41  
42  #endif /* RAMFS_ADAPT_H */
43  
44