Changeset 324 for soft/giet_vm/giet_common/utils.c
- Timestamp:
- Jun 10, 2014, 2:20:55 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_common/utils.c
r315 r324 12 12 13 13 #include <giet_config.h> 14 #include <hard_config.h> 14 15 #include <mapping_info.h> 15 16 #include <utils.h> … … 890 891 891 892 /////////////////////////////////////////////////////////////////////////////////// 892 // This function returns the information associated to a heap (size and vaddr)893 // This function returns the information associated to a heap : size and vaddr. 893 894 // It uses the global task index (CTX_GTID_ID, unique for each giet task) and the 894 895 // vspace index (CTX_VSID_ID) defined in the task context. … … 897 898 unsigned int* size ) 898 899 { 899 mapping_header_t * header = (mapping_header_t *) (&seg_boot_mapping_base);900 mapping_header_t * header = (mapping_header_t *)SEG_BOOT_MAPPING_BASE; 900 901 mapping_task_t * tasks = _get_task_base(header); 901 902 mapping_vobj_t * vobjs = _get_vobj_base(header); 902 mapping_vspace_t * vspaces = _get_vspace_base(header);903 903 904 904 unsigned int taskid = _get_context_slot(CTX_GTID_ID); 905 unsigned int vspaceid = _get_context_slot(CTX_VSID_ID); 906 907 int heap_local_vobjid = tasks[taskid].heap_vobjid; 908 if (heap_local_vobjid != -1) 909 { 910 unsigned int vobjheapid = heap_local_vobjid + vspaces[vspaceid].vobj_offset; 911 *vaddr = vobjs[vobjheapid].vaddr; 912 *size = vobjs[vobjheapid].length; 913 return 0; 905 906 int vobj_id = tasks[taskid].heap_vobj_id; 907 if (vobj_id != -1) 908 { 909 *vaddr = vobjs[vobj_id].vaddr; 910 *size = vobjs[vobj_id].length; 914 911 } 915 912 else … … 917 914 *vaddr = 0; 918 915 *size = 0; 919 return 0;920 }916 } 917 return 0; 921 918 } 922 919
Note: See TracChangeset
for help on using the changeset viewer.