OSVR-Core
AlignedMemoryC.h
Go to the documentation of this file.
1 
13 /*
14 // Copyright 2015 Sensics, Inc.
15 //
16 // Licensed under the Apache License, Version 2.0 (the "License");
17 // you may not use this file except in compliance with the License.
18 // You may obtain a copy of the License at
19 //
20 // http://www.apache.org/licenses/LICENSE-2.0
21 //
22 // Unless required by applicable law or agreed to in writing, software
23 // distributed under the License is distributed on an "AS IS" BASIS,
24 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 // See the License for the specific language governing permissions and
26 // limitations under the License.
27 */
28 
29 #ifndef INCLUDED_AlignedMemoryC_h_GUID_A6BA9A9A_EF49_4FA7_0312_635E151919E7
30 #define INCLUDED_AlignedMemoryC_h_GUID_A6BA9A9A_EF49_4FA7_0312_635E151919E7
31 
32 /* Internal Includes */
33 #include <osvr/Util/Export.h>
34 #include <osvr/Util/APIBaseC.h>
35 
36 /* Library/third-party includes */
37 /* none */
38 
39 /* Standard includes */
40 #include <stdlib.h>
41 
42 OSVR_EXTERN_C_BEGIN
43 
44 enum {
48 };
49 
53 OSVR_UTIL_EXPORT void *
54 osvrAlignedAlloc(size_t bytes,
55  size_t alignment OSVR_CPP_ONLY(= OSVR_DEFAULT_ALIGN_SIZE));
59 OSVR_UTIL_EXPORT void osvrAlignedFree(void *p);
60 
61 OSVR_EXTERN_C_END
62 
63 #endif
The default (and core-utilized) alignment of imaging buffers, etc.
Definition: AlignedMemoryC.h:47
OSVR_UTIL_EXPORT void osvrAlignedFree(void *p)
Aligned deallocation function, uses the pointer to the original memory block to deallocate it...
Definition: AlignedMemoryC.cpp:64
Header providing basic C macros for defining API headers.
OSVR_UTIL_EXPORT void * osvrAlignedAlloc(size_t bytes, size_t alignment OSVR_CPP_ONLY(=OSVR_DEFAULT_ALIGN_SIZE))
Aligned allocation function, gives a pointer to a block of memory aligned to a memory boundary...