Add memory_estimation function for estimating shm usage

This makes it so that we can actually test that all of our shared memory
channels can fit in the shared memory actually available on a machine.

Change-Id: I348c02bafb6de94413da94c2f591019db4aee463
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/ipc_lib/BUILD b/aos/ipc_lib/BUILD
index 75bbd4d..bae23b8 100644
--- a/aos/ipc_lib/BUILD
+++ b/aos/ipc_lib/BUILD
@@ -445,3 +445,14 @@
         "@com_github_gflags_gflags//:gflags",
     ],
 )
+
+cc_library(
+    name = "memory_estimation",
+    srcs = ["memory_estimation.cc"],
+    hdrs = ["memory_estimation.h"],
+    visibility = ["//visibility:public"],
+    deps = [
+        ":lockless_queue",
+        "//aos:configuration",
+    ],
+)