Skip to content

Commit

Permalink
PinnedMemoryResource by default wraps new_delete_resource
Browse files Browse the repository at this point in the history
  • Loading branch information
wdeconinck committed Oct 15, 2024
1 parent b480383 commit f0c7a26
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pluto/src/pluto/memory_resource/PinnedMemoryResource.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace pluto {

class PinnedMemoryResource : public memory_resource {
public:
PinnedMemoryResource() : PinnedMemoryResource(get_default_resource()) {}
PinnedMemoryResource() : PinnedMemoryResource(new_delete_resource()) {}
PinnedMemoryResource(memory_resource* upstream) : upstream_(upstream) {}
PinnedMemoryResource(std::string_view name) : PinnedMemoryResource(get_registered_resource(name)) {}

Expand Down
2 changes: 1 addition & 1 deletion pluto/src/pluto/memory_resource/memory_resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ using pool_options = STD_PMR::pool_options;
inline memory_resource* null_memory_resource() { return STD_PMR::null_memory_resource(); }
inline memory_resource* new_delete_resource() { return STD_PMR::new_delete_resource(); }
inline memory_resource* get_default_resource() {
//init();
init();
return STD_PMR::get_default_resource(); }
inline void set_default_resource(memory_resource* mr) { STD_PMR::set_default_resource(mr); }

Expand Down

0 comments on commit f0c7a26

Please sign in to comment.