OLD | NEW |
1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
4 */ | 4 */ |
| 5 |
| 6 /* From dev/ppb_memory_dev.idl modified Thu Nov 17 09:45:57 2011. */ |
| 7 |
5 #ifndef PPAPI_C_DEV_PPB_MEMORY_DEV_H_ | 8 #ifndef PPAPI_C_DEV_PPB_MEMORY_DEV_H_ |
6 #define PPAPI_C_DEV_PPB_MEMORY_DEV_H_ | 9 #define PPAPI_C_DEV_PPB_MEMORY_DEV_H_ |
7 | 10 |
| 11 #include "ppapi/c/pp_macros.h" |
8 #include "ppapi/c/pp_stdint.h" | 12 #include "ppapi/c/pp_stdint.h" |
9 | 13 |
10 #define PPB_MEMORY_DEV_INTERFACE_0_1 "PPB_Memory(Dev);0.1" | 14 #define PPB_MEMORY_DEV_INTERFACE_0_1 "PPB_Memory(Dev);0.1" |
11 #define PPB_MEMORY_DEV_INTERFACE PPB_MEMORY_DEV_INTERFACE_0_1 | 15 #define PPB_MEMORY_DEV_INTERFACE PPB_MEMORY_DEV_INTERFACE_0_1 |
12 | 16 |
13 /** | 17 /** |
14 * @file | 18 * @file |
15 * This file defines the PPB_Memory interface defined by the browser and | 19 * This file defines the <code>PPB_Memory interface</code> for functions |
16 * and containing pointers to functions related to memory management. | 20 * related to memory management. |
17 */ | 21 */ |
18 | 22 |
| 23 |
19 /** | 24 /** |
20 * @addtogroup Interfaces | 25 * @addtogroup Interfaces |
21 * @{ | 26 * @{ |
22 */ | 27 */ |
23 | |
24 /** | 28 /** |
25 * The PPB_Memory_Dev interface contains pointers to functions related to memory | 29 * The PPB_Memory_Dev interface contains pointers to functions related to memory |
26 * management. | 30 * management. |
27 * | 31 * |
28 */ | 32 */ |
29 struct PPB_Memory_Dev { | 33 struct PPB_Memory_Dev { |
30 /** | 34 /** |
31 * MemAlloc is a pointer to a function that allocate memory. | 35 * MemAlloc is a pointer to a function that allocate memory. |
32 * | 36 * |
33 * @param[in] num_bytes A number of bytes to allocate. | 37 * @param[in] num_bytes A number of bytes to allocate. |
34 * @return A pointer to the memory if successful, NULL If the | 38 * @return A pointer to the memory if successful, NULL If the |
35 * allocation fails. | 39 * allocation fails. |
36 */ | 40 */ |
37 void* (*MemAlloc)(uint32_t num_bytes); | 41 void* (*MemAlloc)(uint32_t num_bytes); |
38 | |
39 /** | 42 /** |
40 * MemFree is a pointer to a function that deallocates memory. | 43 * MemFree is a pointer to a function that deallocates memory. |
41 * | 44 * |
42 * @param[in] ptr A pointer to the memory to deallocate. It is safe to | 45 * @param[in] ptr A pointer to the memory to deallocate. It is safe to |
43 * pass NULL to this function. | 46 * pass NULL to this function. |
44 */ | 47 */ |
45 void (*MemFree)(void* ptr); | 48 void (*MemFree)(void* ptr); |
46 }; | 49 }; |
47 /** | 50 /** |
48 * @} | 51 * @} |
49 */ | 52 */ |
50 | 53 |
51 #endif /* PPAPI_C_DEV_PPB_MEMORY_DEV_H_ */ | 54 #endif /* PPAPI_C_DEV_PPB_MEMORY_DEV_H_ */ |
| 55 |
OLD | NEW |