S32r45 sdk oal memory allocator

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32r45 sdk oal memory allocator

Jump to solution
1,651 Views
sinetech
Contributor II

hi everyone,

may I get detailed documentation on the oal_memory_allocator.c section of s32r45 sdk?The following issues were found during debugging.I need to know the Max memory limit,thanks!

log:

[WRN] [OAL_OS_AllocPhysicalMemory:68] Failed to allocate 0x180040 bytes from chunk 1 [WRN] [allocPhysMem:97] Failed to allocate physical memory [WRN] [allocMemoryArea:491] Failed to allocate physical memory OAL memory allocation failed, unit 3
 
 

 

0 Kudos
Reply
1 Solution
1,588 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

The error seems clear: "Failed to allocate 0x180040 bytes from chunk 1"

Maybe the CHUNK IDs are not obvious? That I agree. Those can be found in the app

petervlna_0-1731049960130.png

petervlna_1-1731049968913.png

app_mem_mgr.h

Best regards,

Peter

 

View solution in original post

0 Kudos
Reply
6 Replies
1,612 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

CHUNK 1 is SRAM.

S32R45 has 8MB of SRAM.

Best regards,

Peter

0 Kudos
Reply
1,616 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Let me ask RSDK team and I will come back to you ASAP.

Best regards,

Peter

0 Kudos
Reply
1,608 Views
sinetech
Contributor II
hello petervlna,
I need the OAL detailed documentation because I use OAL frequently, and I spend a lot of time when errors occur.thanks!
Best regards,
Ray
0 Kudos
Reply
1,589 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

The error seems clear: "Failed to allocate 0x180040 bytes from chunk 1"

Maybe the CHUNK IDs are not obvious? That I agree. Those can be found in the app

petervlna_0-1731049960130.png

petervlna_1-1731049968913.png

app_mem_mgr.h

Best regards,

Peter

 

0 Kudos
Reply
1,574 Views
sinetech
Contributor II

hello Peter,
I already know the define of CHUNK ID in app_mem_mgr.h. But I face this error often, even though the request size is 512K that less than 8M SRAM size. 

Running Range FFT Kernel...[WRN] [OAL_OS_AllocPhysicalMemory:68] Failed to allocate 0x80000 bytes from chunk 1
[WRN] [allocPhysMem:97] Failed to allocate physical memory
[WRN] [allocMemoryArea:491] Failed to allocate physical memory
AppMemAllocBuffer: failed to alloc 524288 bytes.

Best regards,

Ray

0 Kudos
Reply
1,543 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Without knowing what app are you running ( if it is RSDK or custom) and what RSDK is used, the only assumption I can make is that memory is allocated in SRAM but not properly deallocated so after a few iterations, the error occurs because there is no more available space in that chunk

 As for documentation, apart from what is in the user manual, the source code is available for OAL. Other than that I'm not aware of other, more detailed documentation.

Best regards,

Peter

 

0 Kudos
Reply