aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/simple_memory_arena.h
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-06-12 14:09:31 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-06-12 14:14:02 -0700
commit85c518b8d306204cd7111f321a4b7b204fc554f4 (patch)
tree4bccd9f59fbec5c18ea8036265f289b5064dfc24 /tensorflow/contrib/lite/simple_memory_arena.h
parent52af244989e4eb0505943023014c0a06610a32c9 (diff)
Handle zero-sized TFLite tensor allocations
PiperOrigin-RevId: 200277562
Diffstat (limited to 'tensorflow/contrib/lite/simple_memory_arena.h')
-rw-r--r--tensorflow/contrib/lite/simple_memory_arena.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/contrib/lite/simple_memory_arena.h b/tensorflow/contrib/lite/simple_memory_arena.h
index 5faf78b59e..f738315cf2 100644
--- a/tensorflow/contrib/lite/simple_memory_arena.h
+++ b/tensorflow/contrib/lite/simple_memory_arena.h
@@ -39,7 +39,8 @@ struct ArenaAlloc {
// This small class is responsible for allocating, deallocating and reusing
// dynamic memory from a common underlying buffer. The arena can be used in
// scenarios when the pattern of memory allocations and deallocations is
-// repetitive, e.g. running NN inference in multiple iterations.
+// repetitive, e.g. running NN inference in multiple iterations. Note that
+// zero-sized allocations are explicitly allowed, and will resolve to null.
class SimpleMemoryArena {
public:
explicit SimpleMemoryArena(size_t arena_alignment)