1 | /* $Id: VBoxMPCrUtil.cpp 42029 2012-07-05 15:34:03Z vboxsync $ */
|
---|
2 |
|
---|
3 | /** @file
|
---|
4 | * VBox WDDM Miniport driver
|
---|
5 | */
|
---|
6 |
|
---|
7 | /*
|
---|
8 | * Copyright (C) 2012 Oracle Corporation
|
---|
9 | *
|
---|
10 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
11 | * available from http://www.virtualbox.org. This file is free software;
|
---|
12 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
13 | * General Public License (GPL) as published by the Free Software
|
---|
14 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
15 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
16 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
17 | */
|
---|
18 |
|
---|
19 | #include "VBoxMPWddm.h"
|
---|
20 |
|
---|
21 | #include <iprt/cdefs.h>
|
---|
22 |
|
---|
23 | RT_C_DECLS_BEGIN
|
---|
24 |
|
---|
25 | DECLEXPORT(void *) crAlloc( unsigned int nbytes );
|
---|
26 | //extern DECLEXPORT(void *) crCalloc( unsigned int nbytes );
|
---|
27 | //extern DECLEXPORT(void) crRealloc( void **ptr, unsigned int bytes );
|
---|
28 | DECLEXPORT(void) crFree( void *ptr );
|
---|
29 | DECLEXPORT(void) crMemcpy( void *dst, const void *src, unsigned int bytes );
|
---|
30 | DECLEXPORT(void) crMemset( void *ptr, int value, unsigned int bytes );
|
---|
31 | DECLEXPORT(void) crMemZero( void *ptr, unsigned int bytes );
|
---|
32 | DECLEXPORT(int) crMemcmp( const void *p1, const void *p2, unsigned int bytes );
|
---|
33 | DECLEXPORT(void) crDebug(const char *format, ... );
|
---|
34 | DECLEXPORT(void) crWarning(const char *format, ... );
|
---|
35 | DECLEXPORT(void) crInfo(const char *format, ... );
|
---|
36 | DECLEXPORT(void) crError(const char *format, ... );
|
---|
37 |
|
---|
38 | RT_C_DECLS_END
|
---|
39 |
|
---|
40 | DECLEXPORT(void *) crAlloc( unsigned int nbytes )
|
---|
41 | {
|
---|
42 | return vboxWddmMemAllocZero(nbytes);
|
---|
43 | }
|
---|
44 | //extern DECLEXPORT(void *) crCalloc( unsigned int nbytes );
|
---|
45 | //extern DECLEXPORT(void) crRealloc( void **ptr, unsigned int bytes );
|
---|
46 | DECLEXPORT(void) crFree( void *ptr )
|
---|
47 | {
|
---|
48 | vboxWddmMemFree(ptr);
|
---|
49 | }
|
---|
50 |
|
---|
51 | DECLEXPORT(void) crMemcpy( void *dst, const void *src, unsigned int bytes )
|
---|
52 | {
|
---|
53 | memcpy(dst, src, bytes);
|
---|
54 | }
|
---|
55 |
|
---|
56 | DECLEXPORT(void) crMemset( void *ptr, int value, unsigned int bytes )
|
---|
57 | {
|
---|
58 | memset(ptr, value, bytes);
|
---|
59 | }
|
---|
60 |
|
---|
61 | DECLEXPORT(void) crMemZero( void *ptr, unsigned int bytes )
|
---|
62 | {
|
---|
63 | memset(ptr, 0, bytes);
|
---|
64 | }
|
---|
65 |
|
---|
66 | DECLEXPORT(int) crMemcmp( const void *p1, const void *p2, unsigned int bytes )
|
---|
67 | {
|
---|
68 | return memcmp(p1, p2, bytes);
|
---|
69 | }
|
---|
70 |
|
---|
71 | DECLEXPORT(void) crDebug(const char *format, ... )
|
---|
72 | {
|
---|
73 |
|
---|
74 | }
|
---|
75 |
|
---|
76 | DECLEXPORT(void) crWarning(const char *format, ... )
|
---|
77 | {
|
---|
78 |
|
---|
79 | }
|
---|
80 |
|
---|
81 | DECLEXPORT(void) crInfo(const char *format, ... )
|
---|
82 | {
|
---|
83 |
|
---|
84 | }
|
---|
85 |
|
---|
86 | DECLEXPORT(void) crError(const char *format, ... )
|
---|
87 | {
|
---|
88 |
|
---|
89 | }
|
---|
90 |
|
---|