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 <himself65@outlook.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • 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
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.