Index: /trunk/FACT++/src/fadctrl.cc
===================================================================
--- /trunk/FACT++/src/fadctrl.cc	(revision 11138)
+++ /trunk/FACT++/src/fadctrl.cc	(revision 11139)
@@ -798,4 +798,24 @@
         for (BoardList::iterator i=fBoards.begin(); i!=fBoards.end(); i++)
             i->second.second->CmdSetRunNumber(num);
+
+        return T::GetCurrentState();
+    }
+
+    int SetMaxMemoryBuffer(const EventImp &evt)
+    {
+        if (!CheckEventSize(evt.GetSize(), "SetMaxMemoryBuffer", 2))
+            return T::kSM_FatalError;
+
+        const int16_t mem = evt.GetShort();
+
+        if (mem<=0)
+        {
+            ostringstream msg;
+            msg << hex << "Value " << mem << " out of range.";
+            T::Error(msg);
+            return false;
+        }
+
+        SetMaxMemory(mem);
 
         return T::GetCurrentState();
@@ -1396,4 +1416,9 @@
             ("");
 
+        T::AddEvent("SET_MAX_MEMORY", "S:1")
+            (boost::bind(&StateMachineFAD::SetMaxMemoryBuffer, this, _1))
+            ("Set maximum memory buffer size allowed to be consumed by the EventBuilder to buffer events."
+             "|memory[short]:Buffer size in Mega-bytes.");
+
         T::AddEvent("SET_REGISTER", "I:2")
             (boost::bind(&StateMachineFAD::SetRegister, this, _1))
