Skip to content

Commit

Permalink
Disabled custom allocator for now
Browse files Browse the repository at this point in the history
  • Loading branch information
mgreter committed Nov 13, 2019
1 parent 30e3a25 commit cc3692c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/memory/shared_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,14 @@ namespace Sass {

static void setTaint(bool val) { taint = val; }

#ifdef SASS_CUSTOM_ALLOCATOR
inline void* operator new(size_t nbytes) {
return allocateMem(nbytes);
}

inline void operator delete(void* ptr) {
return deallocateMem(ptr);
}
#endif

virtual sass::string to_string() const = 0;
protected:
Expand Down
2 changes: 1 addition & 1 deletion src/settings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// When enabled we use our custom memory pool allocator
// With intense workloads this can double the performance
// Max memory usage mostly only grows by a slight amount
#define SASS_CUSTOM_ALLOCATOR
// #define SASS_CUSTOM_ALLOCATOR

// How many buckets should we have for the free-list
// Determines when allocations go directly to malloc/free
Expand Down

0 comments on commit cc3692c

Please sign in to comment.