]> gitweb.ps.run Git - matrix_esp_thesis/blob - ext/olm/include/olm/memory.h
remove Todo.md
[matrix_esp_thesis] / ext / olm / include / olm / memory.h
1 /* Copyright 2015, 2016 OpenMarket Ltd
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15
16 /* C bindings for memory functions */
17
18
19 #ifndef OLM_MEMORY_H_
20 #define OLM_MEMORY_H_
21
22 #include <stddef.h>
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 /**
29  * Clear the memory held in the buffer. This is more resilient to being
30  * optimised away than memset or bzero.
31  */
32 void _olm_unset(
33     void volatile * buffer, size_t buffer_length
34 );
35
36 #ifdef __cplusplus
37 } // extern "C"
38 #endif
39
40
41 #endif /* OLM_MEMORY_H_ */