Girinandha-M commented on code in PR #22010:
URL: https://github.com/apache/nuttx/pull/22010#discussion_r4625163791


##########
arch/tricore/src/common/tricore_addrenv.c:
##########
@@ -0,0 +1,447 @@
+/****************************************************************************
+ * arch/tricore/src/common/tricore_addrenv.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <string.h>
+#include <assert.h>
+#include <debug.h>
+
+#include <nuttx/arch.h>
+#include <nuttx/cache.h>
+#include <nuttx/tls.h>
+
+#include <arch/irq.h>
+
+#include <arch/mpu.h>
+
+#include "sched/sched.h"
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+/* Records the stack mpu region id */
+
+#ifdef CONFIG_ARCH_STACK_PROTECT
+static unsigned int g_addrenv_stack_region;
+#endif
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: up_addrenv_create
+ *
+ * Description:
+ *   This function is called when a new task is created in order to
+ *   instantiate an address environment for the new task group.
+ *   up_addrenv_create() is essentially the allocator of the physical
+ *   memory for the new task.
+ *
+ * Input Parameters:
+ *   textsize - The size (in bytes) of the .text address environment needed
+ *     by the task.  This region may be read/execute only.
+ *   datasize - The size (in bytes) of the .data/.bss address environment
+ *     needed by the task.  This region may be read/write only.  NOTE: The
+ *     actual size of the data region that is allocated will include a
+ *     OS private reserved region at the beginning.  The size of the
+ *     private, reserved region is give by ARCH_DATA_RESERVE_SIZE.
+ *   heapsize - The initial size (in bytes) of the heap address environment
+ *     needed by the task.  This region may be read/write only.
+ *   addrenv - The location to return the representation of the task address
+ *     environment.
+ *
+ * Returned Value:
+ *   Zero (OK) on success; a negated errno value on failure.
+ *
+ ****************************************************************************/
+
+int up_addrenv_create(size_t textsize, size_t datasize, size_t heapsize,

Review Comment:
   `up_addrenv_create()` returns success without allocating anything.



-- 
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