platform.c 514 B

12345678910111213141516171819202122
  1. /* Copyright 2016 Google Inc. All Rights Reserved.
  2. Distributed under MIT license.
  3. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
  4. */
  5. #include <stdlib.h>
  6. #include "./platform.h"
  7. #include <brotli/types.h>
  8. /* Default brotli_alloc_func */
  9. void* BrotliDefaultAllocFunc(void* opaque, size_t size) {
  10. BROTLI_UNUSED(opaque);
  11. return malloc(size);
  12. }
  13. /* Default brotli_free_func */
  14. void BrotliDefaultFreeFunc(void* opaque, void* address) {
  15. BROTLI_UNUSED(opaque);
  16. free(address);
  17. }