/src/ots/subprojects/brotli-1.1.0/c/common/platform.c
Line  | Count  | Source  | 
1  |  | /* Copyright 2016 Google Inc. All Rights Reserved.  | 
2  |  |  | 
3  |  |    Distributed under MIT license.  | 
4  |  |    See file LICENSE for detail or copy at https://opensource.org/licenses/MIT  | 
5  |  | */  | 
6  |  |  | 
7  |  | #include <stdlib.h>  | 
8  |  |  | 
9  |  | #include <brotli/types.h>  | 
10  |  |  | 
11  |  | #include "platform.h"  | 
12  |  |  | 
13  |  | /* Default brotli_alloc_func */  | 
14  | 29.9k  | void* BrotliDefaultAllocFunc(void* opaque, size_t size) { | 
15  | 29.9k  |   BROTLI_UNUSED(opaque);  | 
16  | 29.9k  |   return malloc(size);  | 
17  | 29.9k  | }  | 
18  |  |  | 
19  |  | /* Default brotli_free_func */  | 
20  | 294k  | void BrotliDefaultFreeFunc(void* opaque, void* address) { | 
21  | 294k  |   BROTLI_UNUSED(opaque);  | 
22  | 294k  |   free(address);  | 
23  | 294k  | }  |