Skip to content

Commit

Permalink
fixed allocator
Browse files Browse the repository at this point in the history
  • Loading branch information
Austin Han authored and Austin Han committed Sep 25, 2017
1 parent da11a71 commit fd1a99a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/torch/lib/TH/THAllocator.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ void THMapAllocatorContext_free(THMapAllocatorContext *ctx)

static void *_map_alloc(void* ctx_, ptrdiff_t size)
{
if (size == 0) {
return NULL;
}
// if (size == 0) {
// return NULL;
// }

THMapAllocatorContext *ctx = ctx_;
void *data = NULL;
Expand Down Expand Up @@ -336,8 +336,8 @@ static void *THMapAllocator_realloc(void* ctx, void* ptr, ptrdiff_t size) {
}

static void THMapAllocator_free(void* ctx_, void* data) {
if (data == NULL)
return;
// if (data == NULL)
// return;

THMapAllocatorContext *ctx = ctx_;

Expand Down

0 comments on commit fd1a99a

Please sign in to comment.