Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Side by Side Diff: ppapi/c/dev/ppb_memory_dev.h

Issue 7300010: Add PPB_Memory_Dev. This is the first of a few CLs needed to pull MemAlloc and (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up thunk.h Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/ui/ppapi_uitest.cc ('k') | ppapi/cpp/dev/memory_dev.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 * found in the LICENSE file.
4 */
5 #ifndef PPAPI_C_DEV_PPB_MEMORY_DEV_H_
6 #define PPAPI_C_DEV_PPB_MEMORY_DEV_H_
7
8 #include "ppapi/c/pp_stdint.h"
9
10 #define PPB_MEMORY_DEV_INTERFACE_0_1 "PPB_Memory(Dev);0.1"
11 #define PPB_MEMORY_DEV_INTERFACE PPB_MEMORY_DEV_INTERFACE_0_1
12
13 /**
14 * @file
15 * This file defines the PPB_Memory interface defined by the browser and
16 * and containing pointers to functions related to memory management.
17 */
18
19 /**
20 * @addtogroup Interfaces
21 * @{
22 */
23
24 /**
25 * The PPB_Memory_Dev interface contains pointers to functions related to memory
26 * management.
27 *
28 */
29 struct PPB_Memory_Dev {
30 /**
31 * MemAlloc is a pointer to a function that allocate memory.
32 *
33 * @param[in] num_bytes A number of bytes to allocate.
34 * @return A pointer to the memory if successful, NULL If the
35 * allocation fails.
36 */
37 void* (*MemAlloc)(uint32_t num_bytes);
38
39 /**
40 * MemFree is a pointer to a function that deallocates memory.
41 *
42 * @param[in] ptr A pointer to the memory to deallocate. It is safe to
43 * pass NULL to this function.
44 */
45 void (*MemFree)(void* ptr);
46 };
47 /**
48 * @}
49 */
50
51 #endif /* PPAPI_C_DEV_PPB_MEMORY_DEV_H_ */
OLDNEW
« no previous file with comments | « chrome/test/ui/ppapi_uitest.cc ('k') | ppapi/cpp/dev/memory_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698