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 committed May 14, 2020
1 parent eaa16cd commit 4ad2692
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 4ad2692

Please sign in to comment.