Skip to content

Commit

Permalink
src: refactor Reallocate since it introduced in upstream v8
Browse files Browse the repository at this point in the history
PR-URL: #33402
Reviewed-By: Zeyu Yang <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
gengjiawen authored and codebytere committed May 16, 2020
1 parent 34e7400 commit fd89ef1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class NodeArrayBufferAllocator : public ArrayBufferAllocator {
void* Allocate(size_t size) override; // Defined in src/node.cc
void* AllocateUninitialized(size_t size) override;
void Free(void* data, size_t size) override;
virtual void* Reallocate(void* data, size_t old_size, size_t size);
void* Reallocate(void* data, size_t old_size, size_t size) override;
virtual void RegisterPointer(void* data, size_t size) {
total_mem_usage_.fetch_add(size, std::memory_order_relaxed);
}
Expand Down

0 comments on commit fd89ef1

Please sign in to comment.