Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/torch7.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoumith Chintala <soumith@gmail.com>2017-09-26 17:34:11 +0300
committerGitHub <noreply@github.com>2017-09-26 17:34:11 +0300
commit89ede3ba90c906a8ec6b9a0f4bef188ba5bb2fd8 (patch)
tree68562e6d7f030f1413e825475706112bc858d978
parentfbcabfa0cd8ca83589f88079bc1821ec4ce2051f (diff)
revert "fix empty Tensor mmap"
-rw-r--r--lib/TH/THAllocator.c7
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