nghttp2_mem.h 786 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright (C) 2015-2018 Alibaba Group Holding Limited
  3. */
  4. #ifndef NGHTTP2_MEM_H
  5. #define NGHTTP2_MEM_H
  6. #ifdef HAVE_CONFIG_H
  7. #include <config.h>
  8. #endif /* HAVE_CONFIG_H */
  9. #include "nghttp2.h"
  10. #ifdef INFRA_MEM_STATS
  11. #include "infra_mem_stats.h"
  12. #endif
  13. /* The default, system standard memory allocator */
  14. nghttp2_mem *nghttp2_mem_default(void);
  15. /* Convenient wrapper functions to call allocator function in
  16. |mem|. */
  17. void *nghttp2_mem_malloc(nghttp2_mem *mem, size_t size);
  18. void nghttp2_mem_free(nghttp2_mem *mem, void *ptr);
  19. void nghttp2_mem_free2(nghttp2_free free_func, void *ptr, void *mem_user_data);
  20. void *nghttp2_mem_calloc(nghttp2_mem *mem, size_t nmemb, size_t size);
  21. void *nghttp2_mem_realloc(nghttp2_mem *mem, void *ptr, size_t size);
  22. #endif /* NGHTTP2_MEM_H */