diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php
index a46e0f9..196e287 100644
--- a/CRM/Event/Form/Participant.php
+++ b/CRM/Event/Form/Participant.php
@@ -1321,7 +1321,12 @@ WHERE      civicrm_event.is_template IS NULL OR civicrm_event.is_template = 0";
                 }
 
                 require_once 'CRM/Core/BAO/MessageTemplates.php';
+                CRM_Core_Error::debug('CRM_Utils_System::memory()', CRM_Utils_System::memory());
+                for ($mem = 0; $mem < 100; $mem++) {
+                if ($mem % 10 == 0) CRM_Core_Error::debug('CRM_Utils_System::memory()', CRM_Utils_System::memory());
                 list ($mailSent, $subject, $message, $html) = CRM_Core_BAO_MessageTemplates::sendTemplate($sendTemplateParams);
+                }
+                CRM_Core_Error::debug('CRM_Utils_System::memory()', CRM_Utils_System::memory());
 
                 if ($mailSent) {
                     $sent[] = $contactID;

