Guest User

Untitled

a guest
Jul 13th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.68 KB | None | 0 0
  1. diff --git a/v8/src/allocation.cc b/v8/src/allocation.cc
  2. index 6c7a08c..f52ec21 100644
  3. --- a/v8/src/allocation.cc
  4. +++ b/v8/src/allocation.cc
  5. @@ -32,11 +32,15 @@
  6.  #include "checks.h"
  7.  #include "utils.h"
  8.  
  9. +extern void * jsgamecore_malloc( size_t ) ;
  10. +extern void jsgamecore_free( void * ) ;
  11. +
  12. +
  13.  namespace v8 {
  14.  namespace internal {
  15.  
  16.  void* Malloced::New(size_t size) {
  17. -  void* result = malloc(size);
  18. +  void* result = jsgamecore_malloc(size);
  19.    if (result == NULL) {
  20.      v8::internal::FatalProcessOutOfMemory("Malloced operator new");
  21.    }
  22. @@ -45,7 +49,7 @@ void* Malloced::New(size_t size) {
  23.  
  24.  
  25.  void Malloced::Delete(void* p) {
  26. -  free(p);
  27. +  jsgamecore_free(p);
  28.  }
Add Comment
Please, Sign In to add comment