diff options
author | Soumith Chintala <soumith@gmail.com> | 2017-09-26 17:34:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-26 17:34:11 +0300 |
commit | 89ede3ba90c906a8ec6b9a0f4bef188ba5bb2fd8 (patch) | |
tree | 68562e6d7f030f1413e825475706112bc858d978 | |
parent | fbcabfa0cd8ca83589f88079bc1821ec4ce2051f (diff) |
revert "fix empty Tensor mmap"
-rw-r--r-- | lib/TH/THAllocator.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/lib/TH/THAllocator.c b/lib/TH/THAllocator.c index e69b3cc..51ac69b 100644 --- a/lib/TH/THAllocator.c +++ b/lib/TH/THAllocator.c @@ -105,10 +105,6 @@ void THMapAllocatorContext_free(THMapAllocatorContext *ctx) static void *_map_alloc(void* ctx_, ptrdiff_t size) { - if (size == 0) { - return NULL; - } - THMapAllocatorContext *ctx = ctx_; void *data = NULL; @@ -336,9 +332,6 @@ static void *THMapAllocator_realloc(void* ctx, void* ptr, ptrdiff_t size) { } static void THMapAllocator_free(void* ctx_, void* data) { - if (data == NULL) - return; - THMapAllocatorContext *ctx = ctx_; #ifdef _WIN32 |