Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / native_client / tests / irt_ext / mem_calls.h
1 /*
2  * Copyright (c) 2014 The Native Client Authors. All rights reserved.
3  * Use of this source code is governed by a BSD-style license that can be
4  * found in the LICENSE file.
5  */
6
7 /*
8  * This module is intended to keep track of memory calls that have been hooked
9  * into a standard library. Because the IRT has a full implementation of
10  * all the memory related calls (mmap, munmap, mprotect...etc.) this module
11  * simply passes the actual functionality to the IRT.
12  */
13
14 #ifndef NATIVE_CLIENT_TESTS_IRT_EXT_MEM_CALLS_H
15 #define NATIVE_CLIENT_TESTS_IRT_EXT_MEM_CALLS_H
16
17 struct mem_calls_environment {
18   int num_mmap_calls;
19   int num_munmap_calls;
20   int num_mprotect_calls;
21 };
22
23 void init_mem_calls_module(void);
24
25 void init_mem_calls_environment(struct mem_calls_environment *env);
26
27 void activate_mem_calls_env(struct mem_calls_environment *env);
28 void deactivate_mem_calls_env(void);
29
30 #endif /* NATIVE_CLIENT_TESTS_IRT_EXT_MEM_CALLS_H */