diff options
| author | iddqd <[email protected]> | 2022-02-10 16:49:45 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:49:45 +0300 | 
| commit | 07fce9c5f7771600d0b3d70e1f88fd8a7e164d85 (patch) | |
| tree | e4aa4750fbb864d70f8c06cf03d2750e979ea3bf /library/cpp/lfalloc/lf_allocX64.cpp | |
| parent | af42068bf6cd93c976b80dd0388fa48cdf65da11 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/lfalloc/lf_allocX64.cpp')
| -rw-r--r-- | library/cpp/lfalloc/lf_allocX64.cpp | 52 | 
1 files changed, 26 insertions, 26 deletions
diff --git a/library/cpp/lfalloc/lf_allocX64.cpp b/library/cpp/lfalloc/lf_allocX64.cpp index 2eb90761fed..e3dcac8e96e 100644 --- a/library/cpp/lfalloc/lf_allocX64.cpp +++ b/library/cpp/lfalloc/lf_allocX64.cpp @@ -1,4 +1,4 @@ -#include "lf_allocX64.h" +#include "lf_allocX64.h"   //////////////////////////////////////////////////////////////////////////  // hooks @@ -8,14 +8,14 @@  #define OP_THROWNOTHING  #endif -#ifndef _darwin_ +#ifndef _darwin_   #if !defined(YMAKE)  void* operator new(size_t size) { -    return LFAlloc(size); +    return LFAlloc(size);   }  void* operator new(size_t size, const std::nothrow_t&) OP_THROWNOTHING { -    return LFAlloc(size); +    return LFAlloc(size);   }  void operator delete(void* p)OP_THROWNOTHING { @@ -27,11 +27,11 @@ void operator delete(void* p, const std::nothrow_t&)OP_THROWNOTHING {  }  void* operator new[](size_t size) { -    return LFAlloc(size); +    return LFAlloc(size);   }  void* operator new[](size_t size, const std::nothrow_t&) OP_THROWNOTHING { -    return LFAlloc(size); +    return LFAlloc(size);   }  void operator delete[](void* p) OP_THROWNOTHING { @@ -46,20 +46,20 @@ void operator delete[](void* p, const std::nothrow_t&) OP_THROWNOTHING {  //#ifndef _MSC_VER  extern "C" void* malloc(size_t size) { -    return LFAlloc(size); +    return LFAlloc(size);   }  extern "C" void* valloc(size_t size) { -    return LFVAlloc(size); +    return LFVAlloc(size);   }  extern "C" int posix_memalign(void** memptr, size_t alignment, size_t size) { -    return LFPosixMemalign(memptr, alignment, size); +    return LFPosixMemalign(memptr, alignment, size);   }  extern "C" void* memalign(size_t alignment, size_t size) {      void* ptr; -    int res = LFPosixMemalign(&ptr, alignment, size); +    int res = LFPosixMemalign(&ptr, alignment, size);       return res ? nullptr : ptr;  } @@ -84,7 +84,7 @@ extern "C" void* calloc(size_t n, size_t elem_size) {      if (elem_size != 0 && size / elem_size != n)          return nullptr; -    void* result = LFAlloc(size); +    void* result = LFAlloc(size);       if (result != nullptr) {          memset(result, 0, size);      } @@ -97,7 +97,7 @@ extern "C" void cfree(void* ptr) {  extern "C" void* realloc(void* old_ptr, size_t new_size) {      if (old_ptr == nullptr) { -        void* result = LFAlloc(new_size); +        void* result = LFAlloc(new_size);           return result;      }      if (new_size == 0) { @@ -105,7 +105,7 @@ extern "C" void* realloc(void* old_ptr, size_t new_size) {          return nullptr;      } -    void* new_ptr = LFAlloc(new_size); +    void* new_ptr = LFAlloc(new_size);       if (new_ptr == nullptr) {          return nullptr;      } @@ -122,20 +122,20 @@ extern "C" size_t malloc_usable_size(void* ptr) {      return LFGetSize(ptr);  } -NMalloc::TMallocInfo NMalloc::MallocInfo() { -    NMalloc::TMallocInfo r; -#if defined(LFALLOC_DBG) -    r.Name = "lfalloc_dbg"; -#elif defined(LFALLOC_YT) -    r.Name = "lfalloc_yt"; -#else -    r.Name = "lfalloc"; -#endif -    r.SetParam = &LFAlloc_SetParam; -    r.GetParam = &LFAlloc_GetParam; -    return r; -} +NMalloc::TMallocInfo NMalloc::MallocInfo() {  +    NMalloc::TMallocInfo r;  +#if defined(LFALLOC_DBG)  +    r.Name = "lfalloc_dbg";  +#elif defined(LFALLOC_YT)  +    r.Name = "lfalloc_yt";   #else +    r.Name = "lfalloc";  +#endif  +    r.SetParam = &LFAlloc_SetParam;  +    r.GetParam = &LFAlloc_GetParam;  +    return r;  +}  +#else   NMalloc::TMallocInfo NMalloc::MallocInfo() {      NMalloc::TMallocInfo r;      r.Name = "system-darwin";  | 
