File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -61,15 +61,15 @@ class BCN_API block_arena
6161 }
6262
6363 // / Malloc throws if memory is not allocated.
64- virtual INLINE void * malloc (size_t bytes) THROWS
64+ virtual INLINE void * malloc_ (size_t bytes) THROWS
6565 {
6666 BC_PUSH_WARNING (NO_MALLOC_OR_FREE)
6767 return std::malloc (bytes);
6868 BC_POP_WARNING ()
6969 }
7070
7171 // / Free does not throw, behavior is undefined if address is incorrect.
72- virtual INLINE void free (void * address) NOEXCEPT
72+ virtual INLINE void free_ (void * address) NOEXCEPT
7373 {
7474 BC_PUSH_WARNING (NO_MALLOC_OR_FREE)
7575 std::free (address);
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ void block_arena::release(void* address) NOEXCEPT
9494 while (!is_null (address))
9595 {
9696 const auto link = get_link (pointer_cast<uint8_t >(address));
97- free (address);
97+ free_ (address);
9898 address = link;
9999 }
100100}
@@ -109,7 +109,7 @@ void block_arena::push(size_t minimum) THROWS
109109 // Ensure next allocation accomodates link plus current request.
110110 BC_ASSERT (!is_add_overflow (minimum, link_size));
111111 size_ = std::max (size_, minimum + link_size);
112- const auto map = pointer_cast<uint8_t >(malloc (size_));
112+ const auto map = pointer_cast<uint8_t >(malloc_ (size_));
113113
114114 if (is_null (map))
115115 throw allocation_exception{};
Original file line number Diff line number Diff line change @@ -94,13 +94,13 @@ class accessor
9494 return to_aligned (value, align);
9595 }
9696
97- void * malloc (size_t bytes) THROWS override
97+ void * malloc_ (size_t bytes) THROWS override
9898 {
9999 stack.emplace_back (bytes, 0xff_u8);
100100 return stack.back ().data ();
101101 }
102102
103- void free (void * address) NOEXCEPT override
103+ void free_ (void * address) NOEXCEPT override
104104 {
105105 freed.push_back (address);
106106 }
@@ -153,7 +153,7 @@ class accessor_null_malloc
153153public:
154154 using accessor::accessor;
155155
156- void * malloc (size_t ) THROWS override
156+ void * malloc_ (size_t ) THROWS override
157157 {
158158 return nullptr ;
159159 }
You can’t perform that action at this time.
0 commit comments