File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,16 +69,18 @@ rcutils_get_zero_initialized_allocator(void)
6969 return zero_allocator ;
7070}
7171
72+ static rcutils_allocator_t default_allocator = {
73+ .allocate = __default_allocate ,
74+ .deallocate = __default_deallocate ,
75+ .reallocate = __default_reallocate ,
76+ .zero_allocate = __default_zero_allocate ,
77+ .state = NULL ,
78+ };
79+
7280rcutils_allocator_t
7381rcutils_get_default_allocator (void )
7482{
75- static rcutils_allocator_t default_allocator = {
76- .allocate = __default_allocate ,
77- .deallocate = __default_deallocate ,
78- .reallocate = __default_reallocate ,
79- .zero_allocate = __default_zero_allocate ,
80- .state = NULL ,
81- };
83+ return default_allocator ;
8284}
8385
8486bool
@@ -95,12 +97,6 @@ rcutils_set_default_allocator(rcutils_allocator_t * allocator){
9597 return false;
9698}
9799
98- rcutils_allocator_t
99- rcutils_get_default_allocator ()
100- {
101- return default_allocator ;
102- }
103-
104100bool
105101rcutils_allocator_is_valid (const rcutils_allocator_t * allocator )
106102{
You can’t perform that action at this time.
0 commit comments