libmsr
0.3.0
A friendlier interface to accessing MSRs on Intel platforms
Main Page
Related Pages
Classes
Files
File List
File Members
•
All
Classes
Files
Functions
Variables
Enumerations
Enumerator
Macros
Pages
include
memhdlr.h
Go to the documentation of this file.
1
/* memhdlr.h
2
*
3
* Copyright (c) 2011-2016, Lawrence Livermore National Security, LLC.
4
* LLNL-CODE-645430
5
*
6
* Produced at Lawrence Livermore National Laboratory
7
* Written by Barry Rountree, rountree@llnl.gov
8
* Scott Walker, walker91@llnl.gov
9
* Kathleen Shoga, shoga1@llnl.gov
10
*
11
* All rights reserved.
12
*
13
* This file is part of libmsr.
14
*
15
* libmsr is free software: you can redistribute it and/or modify it under the
16
* terms of the GNU Lesser General Public License as published by the Free
17
* Software Foundation, either version 3 of the License, or (at your option)
18
* any later version.
19
*
20
* libmsr is distributed in the hope that it will be useful, but WITHOUT ANY
21
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
22
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
23
* details.
24
*
25
* You should have received a copy of the GNU Lesser General Public License
26
* along with libmsr. If not, see <http://www.gnu.org/licenses/>.
27
*
28
* This material is based upon work supported by the U.S. Department of
29
* Energy's Lawrence Livermore National Laboratory. Office of Science, under
30
* Award number DE-AC52-07NA27344.
31
*
32
*/
33
34
#ifndef MEMHDLR_H_INCLUDE
35
#define MEMHDLR_H_INCLUDE
36
37
#include <stdlib.h>
38
39
// These functions are for libmsr use only. Use outside of libmsr may cause
40
// segfaults or disrupt libmsr functions.
41
// The primary purpose of these functions is to simplify memory management and
42
// debugging (debugging much easier), but there are plans to add more
43
// functionality in the future.
44
45
#ifdef __cplusplus
46
extern
"C"
{
47
#endif
48
50
enum
libmsr_mem_mgmt_e
{
51
LIBMSR_FREE
,
52
LIBMSR_MALLOC
,
53
LIBMSR_CALLOC
,
54
LIBMSR_REALLOC
,
55
LIBMSR_FINALIZE
56
};
57
63
void
*
libmsr_malloc
(
size_t
size);
64
73
void
*
libmsr_calloc
(
size_t
num,
74
size_t
size);
75
83
void
*
libmsr_realloc
(
void
*addr,
84
size_t
size);
85
91
void
*
libmsr_free
(
void
*addr);
92
97
void
*
memhdlr_finalize
(
void
);
98
109
int
memory_handler
(
void
*address,
110
void
*oldaddr,
111
int
type);
112
113
#ifdef __cplusplus
114
}
115
#endif
116
#endif
Generated by
1.8.2