crafcat7 commented on code in PR #2468:
URL: https://github.com/apache/nuttx-apps/pull/2468#discussion_r1705041390


##########
testing/memstress/memorystress_main.c:
##########
@@ -448,14 +455,40 @@ static void init(FAR struct memorystress_context_s 
*context, int argc,
     {
       free(func);
       free(config);
-      free(context->node_array);
       syslog(LOG_ERR, MEMSTRESS_PREFIX "Malloc Node Array Failed\n");
       exit(EXIT_FAILURE);
     }
 
+  context->threads = zalloc(context->nthreads * sizeof(pthread_t));
+  if (context->threads == NULL)
+    {
+      free(func);
+      free(config);
+      free(context->node_array);
+      syslog(LOG_ERR, MEMSTRESS_PREFIX "Malloc threads Failed\n");
+      exit(EXIT_FAILURE);
+    }
+
   srand(time(NULL));
 }
 
+/****************************************************************************
+ * Name: memorystress_thread
+ ****************************************************************************/
+
+FAR void *memorystress_thread(void *arg)
+{
+  FAR struct memorystress_context_s *context;
+
+  context = (struct memorystress_context_s *)arg;

Review Comment:
   Done



##########
testing/memstress/memorystress_main.c:
##########
@@ -100,7 +100,9 @@ struct memorystress_context_s
   struct memorystress_node_s *node_array;
   struct memorystress_config_s *config;

Review Comment:
   Done



##########
testing/memstress/memorystress_main.c:
##########
@@ -100,7 +100,9 @@ struct memorystress_context_s
   struct memorystress_node_s *node_array;
   struct memorystress_config_s *config;
   struct memorystress_error_s error;
+  pthread_t *threads;

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to