Skip to content

Commit

Permalink
Fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
pablogs9 committed Apr 29, 2024
1 parent 6236da5 commit 4b7f86b
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions src/allocator.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,18 @@ rcutils_get_zero_initialized_allocator(void)
return zero_allocator;
}

static rcutils_allocator_t default_allocator = {
.allocate = __default_allocate,
.deallocate = __default_deallocate,
.reallocate = __default_reallocate,
.zero_allocate = __default_zero_allocate,
.state = NULL,
};

rcutils_allocator_t
rcutils_get_default_allocator(void)
{
static rcutils_allocator_t default_allocator = {
.allocate = __default_allocate,
.deallocate = __default_deallocate,
.reallocate = __default_reallocate,
.zero_allocate = __default_zero_allocate,
.state = NULL,
};
return default_allocator;
}

bool
Expand All @@ -101,12 +103,6 @@ rcutils_set_default_allocator(rcutils_allocator_t * allocator){
return false;
}

rcutils_allocator_t
rcutils_get_default_allocator()
{
return default_allocator;
}

bool
rcutils_allocator_is_valid(const rcutils_allocator_t * allocator)
{
Expand Down

0 comments on commit 4b7f86b

Please sign in to comment.