Skip to content

Commit

Permalink
Clangformat
Browse files Browse the repository at this point in the history
  • Loading branch information
mjp41 committed Sep 28, 2023
1 parent 58ce068 commit 78f76ec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
3 changes: 1 addition & 2 deletions src/snmalloc/mem/corealloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1039,8 +1039,7 @@ namespace snmalloc
capptr::Alloc<void> spare_start = pointer_offset(raw, round_sizeof);
Range<capptr::bounds::Alloc> r{spare_start, spare};

auto p = capptr::Alloc<CA>::unsafe_from(
new (raw.unsafe_ptr()) CA(r, lc));
auto p = capptr::Alloc<CA>::unsafe_from(new (raw.unsafe_ptr()) CA(r, lc));

// Remove excess from the permissions.
p = Aal::capptr_bound<CA, capptr::bounds::Alloc>(p, round_sizeof);
Expand Down
9 changes: 3 additions & 6 deletions src/snmalloc/mem/pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ namespace snmalloc
template<class T>
class PoolState
{
template<
typename TT,
typename Construct,
PoolState<TT>& get_state()>
template<typename TT, typename Construct, PoolState<TT>& get_state()>
friend class Pool;

private:
Expand Down Expand Up @@ -64,8 +61,8 @@ namespace snmalloc
/**
* @brief Default construct helper for the pool. Just uses `new`. This can't
* be used by the allocator pool as it has not created memory yet.
*
* @tparam T
*
* @tparam T
*/
template<typename T>
class DefaultConstruct
Expand Down
5 changes: 1 addition & 4 deletions src/snmalloc/mem/pooled.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ namespace snmalloc
class Pooled
{
public:
template<
typename TT,
typename Construct,
PoolState<TT>& get_state()>
template<typename TT, typename Construct, PoolState<TT>& get_state()>
friend class Pool;

/// Used by the pool for chaining together entries when not in use.
Expand Down

0 comments on commit 78f76ec

Please sign in to comment.