Commit e5280cf 1 parent a32965c commit e5280cf Copy full SHA for e5280cf
File tree 6 files changed +65
-2
lines changed
6 files changed +65
-2
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ set(CORE_SOURCES
55
55
core/HeapPage.cpp
56
56
core/SizedPage.cpp
57
57
core/LocalityPage.cpp
58
+ core/Localizer.cpp
58
59
59
60
core/Utils.cpp
60
61
Original file line number Diff line number Diff line change
1
+
2
+ /*
3
+ * This file is part of the Alaska Handle-Based Memory Management System
4
+ *
5
+ * Copyright (c) 2024, Nick Wanninger <ncw@u.northwestern.edu>
6
+ * Copyright (c) 2024, The Constellation Project
7
+ * All rights reserved.
8
+ *
9
+ * This is free software. You are permitted to use, redistribute,
10
+ * and modify it as specified in the file "LICENSE".
11
+ */
12
+
13
+
14
+ #include < alaska/Runtime.hpp>
15
+ #include < alaska/Localizer.hpp>
16
+
17
+ namespace alaska {
18
+
19
+
20
+ Localizer::Localizer (alaska::Configuration &config, alaska::Runtime &rt)
21
+ : rt(rt) {}
22
+ void Localizer::feed_hotness_data (size_t count, handle_id_t *handle_ids) {}
23
+ } // namespace alaska
Original file line number Diff line number Diff line change
1
+
1
2
/*
2
3
* This file is part of the Alaska Handle-Based Memory Management System
3
4
*
13
14
#include < alaska/Runtime.hpp>
14
15
#include < alaska/SizeClass.hpp>
15
16
#include < alaska/BarrierManager.hpp>
17
+ #include < alaska/Localizer.hpp>
16
18
#include " alaska/alaska.hpp"
17
19
#include " alaska/utils.h"
18
20
#include < stdlib.h>
@@ -28,7 +30,8 @@ namespace alaska {
28
30
29
31
Runtime::Runtime (alaska::Configuration config)
30
32
: handle_table(config)
31
- , heap(config) {
33
+ , heap(config)
34
+ , locality_manager(config, *this ) {
32
35
// Validate that there is not already a runtime (TODO: atomics?)
33
36
ALASKA_ASSERT (g_runtime == nullptr , " Cannot create more than one runtime" );
34
37
Original file line number Diff line number Diff line change
1
+ /*
2
+ * This file is part of the Alaska Handle-Based Memory Management System
3
+ *
4
+ * Copyright (c) 2024, Nick Wanninger <ncw@u.northwestern.edu>
5
+ * Copyright (c) 2024, The Constellation Project
6
+ * All rights reserved.
7
+ *
8
+ * This is free software. You are permitted to use, redistribute,
9
+ * and modify it as specified in the file "LICENSE".
10
+ */
11
+
12
+ #pragma once
13
+
14
+ #include < alaska/alaska.hpp>
15
+ #include < alaska/Configuration.hpp>
16
+
17
+ namespace alaska {
18
+
19
+
20
+ // fwd decl
21
+ struct Runtime ;
22
+
23
+
24
+ class Localizer {
25
+ alaska::Runtime &rt;
26
+
27
+ public:
28
+ Localizer (alaska::Configuration &config, alaska::Runtime &rt);
29
+ void feed_hotness_data (size_t count, handle_id_t *handle_ids);
30
+ };
31
+ } // namespace alaska
Original file line number Diff line number Diff line change 18
18
#include < alaska/alaska.hpp>
19
19
#include < ck/set.h>
20
20
#include < alaska/Configuration.hpp>
21
+ #include < alaska/Localizer.hpp>
21
22
22
23
namespace alaska {
23
24
/* *
@@ -52,6 +53,8 @@ namespace alaska {
52
53
// This is defaulted to a "nop" manager which simply does nothing.
53
54
alaska::BarrierManager *barrier_manager;
54
55
56
+ alaska::Localizer locality_manager;
57
+
55
58
56
59
// Return the singleton instance of the Runtime if it has been allocated. Abort otherwise.
57
60
static Runtime &get ();
Original file line number Diff line number Diff line change @@ -52,6 +52,8 @@ namespace alaska {
52
52
extern long translation_hits;
53
53
extern long translation_misses;
54
54
55
+ using handle_id_t = uint64_t ;
56
+
55
57
56
58
class Mapping {
57
59
private:
@@ -125,7 +127,7 @@ namespace alaska {
125
127
return out;
126
128
}
127
129
128
- ALASKA_INLINE uint64_t handle_id (void ) const {
130
+ ALASKA_INLINE handle_id_t handle_id (void ) const {
129
131
uint64_t out = ((uint64_t )encode () << ALASKA_SIZE_BITS);
130
132
return (out & ~(1UL << 63 )) >> ALASKA_SIZE_BITS;
131
133
}
You can’t perform that action at this time.
0 commit comments