@@ -122,7 +122,6 @@ static std::string architecture_string(T value, const char *s)
122
122
std::string (s) + " =" + std::to_string (value) + " ;\n " ;
123
123
}
124
124
125
- using max_alloc_sizet = uint64_t ;
126
125
// / The maximum allocation size is determined by the number of bits that
127
126
// / are left in the pointer of width \p pointer_width.
128
127
// /
@@ -131,7 +130,7 @@ using max_alloc_sizet = uint64_t;
131
130
// / \param pointer_width: The width of the pointer
132
131
// / \param object_bits : The number of bits used to represent the ID
133
132
// / \return The size in bytes of the maximum allocation supported.
134
- static max_alloc_sizet
133
+ static size_t
135
134
max_malloc_size (std::size_t pointer_width, std::size_t object_bits)
136
135
{
137
136
PRECONDITION (pointer_width >= 1 );
@@ -142,9 +141,8 @@ max_malloc_size(std::size_t pointer_width, std::size_t object_bits)
142
141
// but also down to -allocation_size + 1, therefore the size is allowable
143
142
// is number of bits, less the signed bit.
144
143
const auto bits_for_positive_offset = offset_bits - 1 ;
145
- PRECONDITION (
146
- bits_for_positive_offset < std::numeric_limits<max_alloc_sizet>::digits);
147
- return ((max_alloc_sizet)1 ) << (max_alloc_sizet)bits_for_positive_offset;
144
+ PRECONDITION (bits_for_positive_offset < std::numeric_limits<size_t >::digits);
145
+ return ((size_t )1 ) << (size_t )bits_for_positive_offset;
148
146
}
149
147
150
148
void ansi_c_internal_additions (std::string &code)
0 commit comments